pub trait SelectorImpl<'i>: Clone + Debug + Sized + 'static {
    type ExtraMatchingData: Sized + Default + 'static;
    type AttrValue: Clone + PartialEq + From<CowRcStr<'i>> + ToCss;
    type Identifier: Clone + PartialEq + From<CowRcStr<'i>> + ToCss;
    type LocalName: Clone + PartialEq + From<CowRcStr<'i>> + ToCss + Borrow<Self::BorrowedLocalName>;
    type NamespaceUrl: Clone + PartialEq + Default + Borrow<Self::BorrowedNamespaceUrl>;
    type NamespacePrefix: Clone + PartialEq + From<CowRcStr<'i>> + ToCss + Default;
    type BorrowedNamespaceUrl: ?Sized + Eq;
    type BorrowedLocalName: ?Sized + Eq;
    type NonTSPseudoClass: Clone + PartialEq + NonTSPseudoClass<'i, Impl = Self>;
    type VendorPrefix: Sized + Eq + Clone + ToCss;
    type PseudoElement: Clone + PartialEq + PseudoElement<'i, Impl = Self>;

    fn to_css<W: Write>(
        selectors: &SelectorList<'i, Self>,
        dest: &mut W
    ) -> Result { ... } }
Expand description

This trait allows to define the parser implementation in regards of pseudo-classes/elements

NB: We need Clone so that we can derive(Clone) on struct with that are parameterized on SelectorImpl. See https://github.com/rust-lang/rust/issues/26925

Required Associated Types§

non tree-structural pseudo-classes (see: https://drafts.csswg.org/selectors/#structural-pseudos)

pseudo-elements

Provided Methods§

Implementors§