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_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.
Sourcepub fn is_ancestor(&self) -> bool
pub fn is_ancestor(&self) -> bool
Returns true if this combinator represents a jump to an ancestor. Note that this includes combinators like ::part() / ::slotted() and pseudo-elements!
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more