Enum selectors::context::MatchingMode[][src]

pub enum MatchingMode {
    Normal,
    ForStatelessPseudoElement,
}

What kind of selector matching mode we should use.

There are two modes of selector matching. The difference is only noticeable in presence of pseudo-elements.

Variants

Normal

Don’t ignore any pseudo-element selectors.

ForStatelessPseudoElement

Ignores any stateless pseudo-element selectors in the rightmost sequence of simple selectors.

This is useful, for example, to match against ::before when you aren’t a pseudo-element yourself.

For example, in presence of ::before:hover, it would never match, but ::before would be ignored as in “matching”.

It’s required for all the selectors you match using this mode to have a pseudo-element.

Trait Implementations

impl Clone for MatchingMode[src]

impl Copy for MatchingMode[src]

impl Debug for MatchingMode[src]

impl PartialEq<MatchingMode> for MatchingMode[src]

impl StructuralPartialEq for MatchingMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.