pub enum IdentifierRef<'a> {
Quoted(&'a str),
Unquoted(&'a str),
}
Expand description
An alternative to Identifier that holds &str instead of String. Allows for allocationless comparison of Identifier.
Variants§
Quoted(&'a str)
This variant is case sensitive “fOo”“bAr”“” is stored as fOo“bAr“
Unquoted(&'a str)
This variant is case insensitive Only ascii alphanumeric and _ characters are allowed in this variant fOo_bAr is stored as fOo_bAr
Trait Implementations§
Source§impl<'a> Debug for IdentifierRef<'a>
impl<'a> Debug for IdentifierRef<'a>
Source§impl PartialEq<Identifier> for IdentifierRef<'_>
impl PartialEq<Identifier> for IdentifierRef<'_>
Source§impl PartialEq<IdentifierRef<'_>> for Identifier
impl PartialEq<IdentifierRef<'_>> for Identifier
Source§impl PartialEq for IdentifierRef<'_>
impl PartialEq for IdentifierRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for IdentifierRef<'a>
impl<'a> RefUnwindSafe for IdentifierRef<'a>
impl<'a> Send for IdentifierRef<'a>
impl<'a> Sync for IdentifierRef<'a>
impl<'a> Unpin for IdentifierRef<'a>
impl<'a> UnwindSafe for IdentifierRef<'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> 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