pub struct Identifier(pub String);Expand description
A generic identifier.
Tuple Fields§
§0: StringImplementations§
Source§impl Identifier
impl Identifier
Sourcepub fn new<N>(name: N) -> Result<Self, IdentifierError>
pub fn new<N>(name: N) -> Result<Self, IdentifierError>
Create a new Identifier.
§Errors
This function will fail if the identifier starts with a digit or contains non-alphanumeric ASCII characters.
Trait Implementations§
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 Display for Identifier
impl Display for Identifier
Source§impl<'a> From<&'a str> for Identifier
impl<'a> From<&'a str> for Identifier
Source§impl From<Identifier> for ArrayedIdentifier
impl From<Identifier> for ArrayedIdentifier
Source§fn from(ident: Identifier) -> Self
fn from(ident: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<String> for Identifier
impl From<String> for Identifier
Source§impl Host for Identifier
impl Host for Identifier
Source§impl HostMut for Identifier
impl HostMut for Identifier
Source§fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
Visit an AST node.
Source§impl Parse for Identifier
impl Parse for Identifier
Source§impl PartialEq for Identifier
impl PartialEq 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