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 for Combinator
impl PartialEq for Combinator
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 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)