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 for PseudoElementSelectorChildren
impl PartialEq 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 ==
.impl Eq for PseudoElementSelectorChildren
impl StructuralPartialEq for PseudoElementSelectorChildren
Auto Trait Implementations§
impl Freeze for PseudoElementSelectorChildren
impl RefUnwindSafe for PseudoElementSelectorChildren
impl Send for PseudoElementSelectorChildren
impl Sync for PseudoElementSelectorChildren
impl Unpin for PseudoElementSelectorChildren
impl UnwindSafe for PseudoElementSelectorChildren
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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