selectors::parser

Trait NonTSPseudoClass

Source
pub trait NonTSPseudoClass: Sized + ToCss {
    type Impl: SelectorImpl;

    // Required methods
    fn is_active_or_hover(&self) -> bool;
    fn is_user_action_state(&self) -> bool;

    // Provided method
    fn visit<V>(&self, _visitor: &mut V) -> bool
       where V: SelectorVisitor<Impl = Self::Impl> { ... }
}
Expand description

A trait that represents a pseudo-class.

Required Associated Types§

Source

type Impl: SelectorImpl

The SelectorImpl this pseudo-element is used for.

Required Methods§

Source

fn is_active_or_hover(&self) -> bool

Whether this pseudo-class is :active or :hover.

Source

fn is_user_action_state(&self) -> bool

Whether this pseudo-class belongs to:

https://drafts.csswg.org/selectors-4/#useraction-pseudos

Provided Methods§

Source

fn visit<V>(&self, _visitor: &mut V) -> bool
where V: SelectorVisitor<Impl = Self::Impl>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§