Struct move_core_types::identifier::Identifier
source · pub struct Identifier(_);
Expand description
An owned identifier.
For more details, see the module level documentation.
Implementations§
source§impl Identifier
impl Identifier
sourcepub fn is_self(&self) -> bool
pub fn is_self(&self) -> bool
Returns if this identifier is “
sourcepub fn as_ident_str(&self) -> &IdentStr
pub fn as_ident_str(&self) -> &IdentStr
Creates a borrowed version of self
.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Converts this Identifier
into a String
.
This is not implemented as a From
trait to discourage automatic conversions – these
conversions should not typically happen.
sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Converts this Identifier
into a UTF-8-encoded byte sequence.
Methods from Deref<Target = IdentStr>§
Trait Implementations§
source§impl Arbitrary for Identifier
impl Arbitrary for Identifier
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<Identifier>
type Strategy = BoxedStrategy<Identifier>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with((): ()) -> Self::Strategy
fn arbitrary_with((): ()) -> Self::Strategy
source§impl AsRef<IdentStr> for Identifier
impl AsRef<IdentStr> for Identifier
source§impl Borrow<IdentStr> for Identifier
impl Borrow<IdentStr> for Identifier
source§impl Clone for Identifier
impl Clone for Identifier
source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Identifier
impl Debug for Identifier
source§impl Deref for Identifier
impl Deref for Identifier
source§impl<'de> Deserialize<'de> for Identifier
impl<'de> Deserialize<'de> for Identifier
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for Identifier
impl Display for Identifier
source§impl From<&IdentStr> for Identifier
impl From<&IdentStr> for Identifier
source§impl Hash for Identifier
impl Hash for Identifier
source§impl Ord for Identifier
impl Ord for Identifier
source§fn cmp(&self, other: &Identifier) -> Ordering
fn cmp(&self, other: &Identifier) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<Identifier> for Identifier
impl PartialEq<Identifier> for Identifier
source§fn eq(&self, other: &Identifier) -> bool
fn eq(&self, other: &Identifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Identifier> for Identifier
impl PartialOrd<Identifier> for Identifier
source§fn partial_cmp(&self, other: &Identifier) -> Option<Ordering>
fn partial_cmp(&self, other: &Identifier) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more