Enum selectors::parser::Combinator
source · pub enum Combinator {
Child,
Descendant,
NextSibling,
LaterSibling,
PseudoElement,
SlotAssignment,
Part,
}
Variants§
Child
Descendant
NextSibling
LaterSibling
PseudoElement
A dummy combinator we use to the left of pseudo-elements.
It serializes as the empty string, and acts effectively as a child combinator in most cases. If we ever actually start using a child combinator for this, we will need to fix up the way hashes are computed for revalidation selectors.
SlotAssignment
Another combinator used for ::slotted(), which represent the jump from a node to its assigned slot.
Part
Another combinator used for ::part()
, which represents the jump from
the part to the containing shadow host.
Implementations§
source§impl Combinator
impl Combinator
sourcepub fn is_ancestor(&self) -> bool
pub fn is_ancestor(&self) -> bool
Returns true if this combinator is a child or descendant combinator.
sourcepub fn is_pseudo_element(&self) -> bool
pub fn is_pseudo_element(&self) -> bool
Returns true if this combinator is a pseudo-element combinator.
sourcepub fn is_sibling(&self) -> bool
pub fn is_sibling(&self) -> bool
Returns true if this combinator is a next- or later-sibling combinator.
source§impl Combinator
impl Combinator
Trait Implementations§
source§impl Clone for Combinator
impl Clone for Combinator
source§fn clone(&self) -> Combinator
fn clone(&self) -> Combinator
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 Combinator
impl Debug for Combinator
source§impl PartialEq<Combinator> for Combinator
impl PartialEq<Combinator> for Combinator
source§fn eq(&self, other: &Combinator) -> bool
fn eq(&self, other: &Combinator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.