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 From<Identifier> for SourceKey
impl From<Identifier> for SourceKey
Source§fn from(id: Identifier) -> Self
fn from(id: Identifier) -> Self
Converts to this type from the input type.
Source§impl FromStr for Identifier
impl FromStr for Identifier
Source§impl Hash for Identifier
impl Hash for Identifier
Source§impl IntoDocument for Identifier
impl IntoDocument for Identifier
Source§fn write_to(self, c: &mut DocumentConstructor) -> Result<(), WriteError>
fn write_to(self, c: &mut DocumentConstructor) -> Result<(), WriteError>
Write this value to the current node in the document constructor.
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§type Error = ParseError
type Error = ParseError
The error type returned by parsing.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.