pub struct TypedIdentifier<K> { /* private fields */ }Implementations§
Source§impl<K> TypedIdentifier<K>
impl<K> TypedIdentifier<K>
pub const fn from_identifier(identifier: Identifier) -> TypedIdentifier<K>
pub const fn as_identifier(&self) -> &Identifier
pub fn as_str(&self) -> &str
pub fn into_inner(self) -> Identifier
Source§impl<K> TypedIdentifier<K>where
K: IdentifierKind,
impl<K> TypedIdentifier<K>where
K: IdentifierKind,
Sourcepub fn new(input: &str) -> Result<TypedIdentifier<K>, IdentifierError>
pub fn new(input: &str) -> Result<TypedIdentifier<K>, IdentifierError>
Creates a typed identifier from user-provided text.
§Errors
Returns IdentifierError::Empty when the trimmed input is empty and
IdentifierError::InvalidCharacter when it contains unsupported characters.
pub const fn kind_name(&self) -> &'static str
Trait Implementations§
Source§impl<K> Clone for TypedIdentifier<K>where
K: Clone,
impl<K> Clone for TypedIdentifier<K>where
K: Clone,
Source§fn clone(&self) -> TypedIdentifier<K>
fn clone(&self) -> TypedIdentifier<K>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K> Debug for TypedIdentifier<K>where
K: Debug,
impl<K> Debug for TypedIdentifier<K>where
K: Debug,
Source§impl<K> Display for TypedIdentifier<K>
impl<K> Display for TypedIdentifier<K>
Source§impl<K> Hash for TypedIdentifier<K>where
K: Hash,
impl<K> Hash for TypedIdentifier<K>where
K: Hash,
Source§impl<K> PartialEq for TypedIdentifier<K>where
K: PartialEq,
impl<K> PartialEq for TypedIdentifier<K>where
K: PartialEq,
Source§fn eq(&self, other: &TypedIdentifier<K>) -> bool
fn eq(&self, other: &TypedIdentifier<K>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<K> Eq for TypedIdentifier<K>where
K: Eq,
impl<K> StructuralPartialEq for TypedIdentifier<K>
Auto Trait Implementations§
impl<K> Freeze for TypedIdentifier<K>
impl<K> RefUnwindSafe for TypedIdentifier<K>
impl<K> Send for TypedIdentifier<K>
impl<K> Sync for TypedIdentifier<K>
impl<K> Unpin for TypedIdentifier<K>
impl<K> UnsafeUnpin for TypedIdentifier<K>
impl<K> UnwindSafe for TypedIdentifier<K>
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