pub enum PseudoElementSelectorChildren {
PreservedToken(TokenAndSpan),
Ident(Ident),
CompoundSelector(CompoundSelector),
CustomHighlightName(CustomHighlightName),
}
Variants§
PreservedToken(TokenAndSpan)
Ident(Ident)
CompoundSelector(CompoundSelector)
CustomHighlightName(CustomHighlightName)
Implementations§
source§impl PseudoElementSelectorChildren
impl PseudoElementSelectorChildren
sourcepub const fn is_preserved_token(&self) -> bool
pub const 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 const fn is_compound_selector(&self) -> bool
pub const 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.
sourcepub const fn is_custom_highlight_name(&self) -> bool
pub const fn is_custom_highlight_name(&self) -> bool
Returns true
if self
is of variant CustomHighlightName
.
sourcepub fn as_custom_highlight_name(&self) -> Option<&CustomHighlightName>
pub fn as_custom_highlight_name(&self) -> Option<&CustomHighlightName>
Returns Some
if self
is a reference of variant CustomHighlightName
, and None
otherwise.
sourcepub fn as_mut_custom_highlight_name(
&mut self
) -> Option<&mut CustomHighlightName>
pub fn as_mut_custom_highlight_name( &mut self ) -> Option<&mut CustomHighlightName>
Returns Some
if self
is a mutable reference of variant CustomHighlightName
, and None
otherwise.
sourcepub fn expect_custom_highlight_name(self) -> CustomHighlightNamewhere
Self: Debug,
pub fn expect_custom_highlight_name(self) -> CustomHighlightNamewhere Self: Debug,
Unwraps the value, yielding the content of CustomHighlightName
.
Panics
Panics if the value is not CustomHighlightName
, with a panic message including the content of self
.
sourcepub fn custom_highlight_name(self) -> Option<CustomHighlightName>
pub fn custom_highlight_name(self) -> Option<CustomHighlightName>
Returns Some
if self
is of variant CustomHighlightName
, and None
otherwise.
Trait Implementations§
source§impl Clone for PseudoElementSelectorChildren
impl Clone for PseudoElementSelectorChildren
source§fn clone(&self) -> PseudoElementSelectorChildren
fn clone(&self) -> PseudoElementSelectorChildren
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl EqIgnoreSpan for PseudoElementSelectorChildren
impl EqIgnoreSpan for PseudoElementSelectorChildren
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<CompoundSelector> for PseudoElementSelectorChildren
impl From<CompoundSelector> for PseudoElementSelectorChildren
source§fn from(v: CompoundSelector) -> Self
fn from(v: CompoundSelector) -> Self
source§impl From<CustomHighlightName> for PseudoElementSelectorChildren
impl From<CustomHighlightName> for PseudoElementSelectorChildren
source§fn from(v: CustomHighlightName) -> Self
fn from(v: CustomHighlightName) -> Self
source§impl From<Ident> for PseudoElementSelectorChildren
impl From<Ident> for PseudoElementSelectorChildren
source§impl From<TokenAndSpan> for PseudoElementSelectorChildren
impl From<TokenAndSpan> for PseudoElementSelectorChildren
source§fn from(v: TokenAndSpan) -> Self
fn from(v: TokenAndSpan) -> Self
source§impl Hash for PseudoElementSelectorChildren
impl Hash for PseudoElementSelectorChildren
source§impl PartialEq<PseudoElementSelectorChildren> for PseudoElementSelectorChildren
impl PartialEq<PseudoElementSelectorChildren> for PseudoElementSelectorChildren
source§fn eq(&self, other: &PseudoElementSelectorChildren) -> bool
fn eq(&self, other: &PseudoElementSelectorChildren) -> bool
self
and other
values to be equal, and is used
by ==
.