pub enum PseudoElementSelectorChildren {
PreservedToken(TokenAndSpan),
Ident(Ident),
CompoundSelector(CompoundSelector),
}
Variants
PreservedToken(TokenAndSpan)
Ident(Ident)
CompoundSelector(CompoundSelector)
Implementations
sourceimpl PseudoElementSelectorChildren
impl PseudoElementSelectorChildren
sourcepub fn is_preserved_token(&self) -> bool
pub fn is_preserved_token(&self) -> bool
Returns true
if self
is of variant PreservedToken
.
sourcepub fn as_preserved_token(&self) -> Option<&TokenAndSpan>
pub fn as_preserved_token(&self) -> Option<&TokenAndSpan>
Returns Some
if self
is a reference of variant PreservedToken
, and None
otherwise.
sourcepub fn as_mut_preserved_token(&mut self) -> Option<&mut TokenAndSpan>
pub fn as_mut_preserved_token(&mut self) -> Option<&mut TokenAndSpan>
Returns Some
if self
is a mutable reference of variant PreservedToken
, and None
otherwise.
sourcepub fn expect_preserved_token(self) -> TokenAndSpanwhere
Self: Debug,
pub fn expect_preserved_token(self) -> TokenAndSpanwhere
Self: Debug,
Unwraps the value, yielding the content of PreservedToken
.
Panics
Panics if the value is not PreservedToken
, with a panic message including the content of self
.
sourcepub fn preserved_token(self) -> Option<TokenAndSpan>
pub fn preserved_token(self) -> Option<TokenAndSpan>
Returns Some
if self
is of variant PreservedToken
, and None
otherwise.
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,
sourcepub fn ident(self) -> Option<Ident>
pub fn ident(self) -> Option<Ident>
Returns Some
if self
is of variant Ident
, and None
otherwise.
sourcepub fn is_compound_selector(&self) -> bool
pub fn is_compound_selector(&self) -> bool
Returns true
if self
is of variant CompoundSelector
.
sourcepub fn as_compound_selector(&self) -> Option<&CompoundSelector>
pub fn as_compound_selector(&self) -> Option<&CompoundSelector>
Returns Some
if self
is a reference of variant CompoundSelector
, and None
otherwise.
sourcepub fn as_mut_compound_selector(&mut self) -> Option<&mut CompoundSelector>
pub fn as_mut_compound_selector(&mut self) -> Option<&mut CompoundSelector>
Returns Some
if self
is a mutable reference of variant CompoundSelector
, and None
otherwise.
sourcepub fn expect_compound_selector(self) -> CompoundSelectorwhere
Self: Debug,
pub fn expect_compound_selector(self) -> CompoundSelectorwhere
Self: Debug,
Unwraps the value, yielding the content of CompoundSelector
.
Panics
Panics if the value is not CompoundSelector
, with a panic message including the content of self
.
sourcepub fn compound_selector(self) -> Option<CompoundSelector>
pub fn compound_selector(self) -> Option<CompoundSelector>
Returns Some
if self
is of variant CompoundSelector
, and None
otherwise.
Trait Implementations
sourceimpl Clone for PseudoElementSelectorChildren
impl Clone for PseudoElementSelectorChildren
sourcefn clone(&self) -> PseudoElementSelectorChildren
fn clone(&self) -> PseudoElementSelectorChildren
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more