pub enum ComplexSelectorChildren {
CompoundSelector(CompoundSelector),
Combinator(Combinator),
}
Variants§
CompoundSelector(CompoundSelector)
Combinator(Combinator)
Implementations§
source§impl ComplexSelectorChildren
impl ComplexSelectorChildren
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.
sourcepub fn is_combinator(&self) -> bool
pub fn is_combinator(&self) -> bool
Returns true
if self
is of variant Combinator
.
sourcepub fn as_combinator(&self) -> Option<&Combinator>
pub fn as_combinator(&self) -> Option<&Combinator>
Returns Some
if self
is a reference of variant Combinator
, and None
otherwise.
sourcepub fn as_mut_combinator(&mut self) -> Option<&mut Combinator>
pub fn as_mut_combinator(&mut self) -> Option<&mut Combinator>
Returns Some
if self
is a mutable reference of variant Combinator
, and None
otherwise.
sourcepub fn expect_combinator(self) -> Combinatorwhere
Self: Debug,
pub fn expect_combinator(self) -> Combinatorwhere
Self: Debug,
Unwraps the value, yielding the content of Combinator
.
Panics
Panics if the value is not Combinator
, with a panic message including the content of self
.
sourcepub fn combinator(self) -> Option<Combinator>
pub fn combinator(self) -> Option<Combinator>
Returns Some
if self
is of variant Combinator
, and None
otherwise.
Trait Implementations§
source§impl Clone for ComplexSelectorChildren
impl Clone for ComplexSelectorChildren
source§fn clone(&self) -> ComplexSelectorChildren
fn clone(&self) -> ComplexSelectorChildren
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ComplexSelectorChildren
impl Debug for ComplexSelectorChildren
source§impl<'de> Deserialize<'de> for ComplexSelectorChildren
impl<'de> Deserialize<'de> for ComplexSelectorChildren
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EqIgnoreSpan for ComplexSelectorChildren
impl EqIgnoreSpan for ComplexSelectorChildren
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<Combinator> for ComplexSelectorChildren
impl From<Combinator> for ComplexSelectorChildren
source§fn from(v: Combinator) -> Self
fn from(v: Combinator) -> Self
source§impl From<CompoundSelector> for ComplexSelectorChildren
impl From<CompoundSelector> for ComplexSelectorChildren
source§fn from(v: CompoundSelector) -> Self
fn from(v: CompoundSelector) -> Self
source§impl Hash for ComplexSelectorChildren
impl Hash for ComplexSelectorChildren
source§impl PartialEq<ComplexSelectorChildren> for ComplexSelectorChildren
impl PartialEq<ComplexSelectorChildren> for ComplexSelectorChildren
source§fn eq(&self, other: &ComplexSelectorChildren) -> bool
fn eq(&self, other: &ComplexSelectorChildren) -> bool
self
and other
values to be equal, and is used
by ==
.