pub enum AttributeSelectorValue {
Str(Str),
Ident(Ident),
}
Variants§
Implementations§
source§impl AttributeSelectorValue
impl AttributeSelectorValue
sourcepub fn as_str(&self) -> Option<&Str>
pub fn as_str(&self) -> Option<&Str>
Returns Some
if self
is a reference of variant Str
, and None
otherwise.
sourcepub fn as_mut_str(&mut self) -> Option<&mut Str>
pub fn as_mut_str(&mut self) -> Option<&mut Str>
Returns Some
if self
is a mutable reference of variant Str
, and None
otherwise.
sourcepub fn expect_str(self) -> Strwhere
Self: Debug,
pub fn expect_str(self) -> Strwhere
Self: Debug,
sourcepub fn as_ident(&self) -> Option<&Ident>
pub fn as_ident(&self) -> Option<&Ident>
Returns Some
if self
is a reference of variant Ident
, and None
otherwise.
sourcepub fn as_mut_ident(&mut self) -> Option<&mut Ident>
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
Returns Some
if self
is a mutable reference of variant Ident
, and None
otherwise.
sourcepub fn expect_ident(self) -> Identwhere
Self: Debug,
pub fn expect_ident(self) -> Identwhere
Self: Debug,
Trait Implementations§
source§impl Clone for AttributeSelectorValue
impl Clone for AttributeSelectorValue
source§fn clone(&self) -> AttributeSelectorValue
fn clone(&self) -> AttributeSelectorValue
Returns a copy 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 AttributeSelectorValue
impl Debug for AttributeSelectorValue
source§impl EqIgnoreSpan for AttributeSelectorValue
impl EqIgnoreSpan for AttributeSelectorValue
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<Ident> for AttributeSelectorValue
impl From<Ident> for AttributeSelectorValue
source§impl From<Str> for AttributeSelectorValue
impl From<Str> for AttributeSelectorValue
source§impl Hash for AttributeSelectorValue
impl Hash for AttributeSelectorValue
source§impl PartialEq for AttributeSelectorValue
impl PartialEq for AttributeSelectorValue
source§fn eq(&self, other: &AttributeSelectorValue) -> bool
fn eq(&self, other: &AttributeSelectorValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Spanned for AttributeSelectorValue
impl Spanned for AttributeSelectorValue
impl Eq for AttributeSelectorValue
impl StructuralEq for AttributeSelectorValue
impl StructuralPartialEq for AttributeSelectorValue
Auto Trait Implementations§
impl RefUnwindSafe for AttributeSelectorValue
impl Send for AttributeSelectorValue
impl Sync for AttributeSelectorValue
impl Unpin for AttributeSelectorValue
impl UnwindSafe for AttributeSelectorValue
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