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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Combinator
impl Debug for Combinator
Source§impl PartialEq for Combinator
impl PartialEq for Combinator
Source§fn eq(&self, other: &Combinator) -> bool
fn eq(&self, other: &Combinator) -> bool
self and other values to be equal, and is used by ==.Source§impl ToCss for Combinator
impl ToCss for Combinator
Source§impl ToShmem for Combinator
impl ToShmem for Combinator
impl Copy for Combinator
impl Eq for Combinator
impl StructuralPartialEq for Combinator
Auto Trait Implementations§
impl Freeze for Combinator
impl RefUnwindSafe for Combinator
impl Send for Combinator
impl Sync for Combinator
impl Unpin for Combinator
impl UnsafeUnpin for Combinator
impl UnwindSafe for Combinator
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.