pub struct ID<'a>(/* private fields */);
Expand description
An identifier, i.e. “ID” in the grammar. Essentially a string.
Identifiers are informally presented in the specification. They can be:
- Any string of alphabetic, digit, or underscore, not begining with a digit
- A numeral
- A double-quoted string
- An HTML string
This structure is simply a wrapper over &str. Depending on how the string is specified, parsing changes a bit. For instance, when a double-quoted string is used, leading and trailing quote marks are dropped. HTML strings are not properly supported.
Trait Implementations§
Source§impl<'a> Ord for ID<'a>
impl<'a> Ord for ID<'a>
Source§impl<'a> PartialOrd for ID<'a>
impl<'a> PartialOrd for ID<'a>
Source§impl<'a> TryFrom<Pair<'a, Rule>> for ID<'a>
impl<'a> TryFrom<Pair<'a, Rule>> for ID<'a>
Source§type Error = ParseError<'a>
type Error = ParseError<'a>
The type returned in the event of a conversion error.
impl<'a> Eq for ID<'a>
impl<'a> StructuralPartialEq for ID<'a>
Auto Trait Implementations§
impl<'a> Freeze for ID<'a>
impl<'a> RefUnwindSafe for ID<'a>
impl<'a> Send for ID<'a>
impl<'a> Sync for ID<'a>
impl<'a> Unpin for ID<'a>
impl<'a> UnwindSafe for ID<'a>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more