Trait selectors::parser::SelectorImpl
[−]
[src]
pub trait SelectorImpl: Sized { type AttrValue: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display; type Identifier: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display; type ClassName: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display; type LocalName: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display + Borrow<Self::BorrowedLocalName>; type NamespaceUrl: Clone + Eq + Hash + Default + Borrow<Self::BorrowedNamespaceUrl>; type NamespacePrefix: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display + Default; type BorrowedNamespaceUrl: ?Sized + Eq; type BorrowedLocalName: ?Sized + Eq + Hash; type NonTSPseudoClass: Clone + Eq + Hash + Sized + ToCss; type PseudoElement: Clone + Eq + Hash + Sized + ToCss; fn attr_exists_selector_is_shareable(_attr_selector: &AttrSelector<Self>)
-> bool { ... } fn attr_equals_selector_is_shareable(_attr_selector: &AttrSelector<Self>,
_value: &Self::AttrValue)
-> bool { ... } }
This trait allows to define the parser implementation in regards of pseudo-classes/elements
Associated Types
type AttrValue: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display
type Identifier: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display
type ClassName: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display
type LocalName: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display + Borrow<Self::BorrowedLocalName>
type NamespaceUrl: Clone + Eq + Hash + Default + Borrow<Self::BorrowedNamespaceUrl>
type NamespacePrefix: Clone + Eq + Hash + From<String> + for<'a> From<&'a str> + Display + Default
type BorrowedNamespaceUrl: ?Sized + Eq
type BorrowedLocalName: ?Sized + Eq + Hash
type NonTSPseudoClass: Clone + Eq + Hash + Sized + ToCss
non tree-structural pseudo-classes (see: https://drafts.csswg.org/selectors/#structural-pseudos)
type PseudoElement: Clone + Eq + Hash + Sized + ToCss
pseudo-elements
Provided Methods
Declares if the following "attribute exists" selector is considered "common" enough to be shareable. If that's not the case, when matching over an element, the relation AFFECTED_BY_NON_COMMON_STYLE_AFFECTING_ATTRIBUTE would be set.
Declares if the following "equals" attribute selector is considered "common" enough to be shareable.