pub struct Identifier(/* private fields */);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 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 duplicate 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 for Identifier
impl PartialEq for Identifier
Source§impl PartialOrd for Identifier
impl PartialOrd for Identifier
Source§impl Serialize for Identifier
impl Serialize for Identifier
impl Eq for Identifier
impl StructuralPartialEq for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more