pub struct Identifier(/* private fields */);Implementations§
Source§impl Identifier
impl Identifier
Sourcepub const fn new_unchecked(s: &'static str) -> Self
pub const fn new_unchecked(s: &'static str) -> Self
Creates a new Identifier without validation.
This function is intended for creating compile-time constants where the identifier string is known to be valid. The caller should ensure that the string is a valid identifier according to Eure rules:
- Must start with XID_Start character or underscore
- Can contain XID_Continue characters or hyphens
- Must not start with $
Note: This function is not marked unsafe because passing an invalid string
does not cause memory unsafety - it only results in a logically invalid Identifier.
pub fn into_string(self) -> String
Trait Implementations§
Source§impl AsRef<str> for Identifier
impl AsRef<str> 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 Display for Identifier
impl Display for Identifier
Source§impl FromStr for Identifier
impl FromStr 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 ParseDocument<'_> for Identifier
impl ParseDocument<'_> for Identifier
Source§fn parse(doc: &EureDocument, node_id: NodeId) -> Result<Self, ParseError>
fn parse(doc: &EureDocument, node_id: NodeId) -> Result<Self, ParseError>
Parse a value of this type from an Eure document at the given node.
Source§impl PartialEq for Identifier
impl PartialEq for Identifier
Source§impl PartialOrd for Identifier
impl PartialOrd 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