Enum selectors::context::MatchingMode
source · pub enum MatchingMode {
Normal,
ForStatelessPseudoElement,
}
Expand description
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§
source§impl Clone for MatchingMode
impl Clone for MatchingMode
source§fn clone(&self) -> MatchingMode
fn clone(&self) -> MatchingMode
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 MatchingMode
impl Debug for MatchingMode
source§impl PartialEq for MatchingMode
impl PartialEq for MatchingMode
impl Copy for MatchingMode
impl StructuralPartialEq for MatchingMode
Auto Trait Implementations§
impl Freeze for MatchingMode
impl RefUnwindSafe for MatchingMode
impl Send for MatchingMode
impl Sync for MatchingMode
impl Unpin for MatchingMode
impl UnwindSafe for MatchingMode
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
)