Skip to main content

Module parser

Module parser 

Source

Re-exports§

pub use crate::visitor::SelectorVisitor;

Structs§

AnPlusB
The properties that comprise an An+B syntax
AncestorHashes
Ancestor hashes for the bloom filter. We precompute these and store them inline with selectors to optimize cache performance during matching. This matters a lot.
LocalName
NthOfSelectorData
The properties that comprise an :nth- pseudoclass as of Selectors 4 (e.g., nth-child(An+B [of S]?)). https://www.w3.org/TR/selectors-4/#nth-child-pseudo
NthSelectorData
The properties that comprise an :nth- pseudoclass as of Selectors 3 (e.g., nth-child(An+B)). https://www.w3.org/TR/selectors-3/#nth-child-pseudo
RelativeSelector
Storage for a relative selector.
RelativeSelectorCombinatorCount
Count of combinators in a given relative selector, not traversing selectors of pseudoclasses.
Selector
A Selector stores a sequence of simple selectors and combinators. The iterator classes allow callers to iterate at either the raw sequence level or at the level of sequences of simple selectors separated by combinators. Most callers want the higher-level iterator.
SelectorIter
SelectorKey
Uniquely identify a selector based on its components, which is behind ThinArc and is therefore stable.
SelectorList
A selector list is a tagged pointer with either a single selector, or a ThinArc<()> of multiple selectors.

Enums§

Combinator
Component
A CSS simple selector or combinator. We store both in the same enum for optimal packing and cache performance, see [1].
MatchesFeaturelessHost
Whether a selector may match a featureless host element, and whether it may match other elements.
NthType
An enum for the different types of :nth- pseudoclasses
ParseRelative
Flag indicating if we’re parsing relative selectors.
RelativeSelectorMatchHint
Flag indicating where a given relative selector’s match would be contained.
SelectorParseErrorKind

Traits§

NonTSPseudoClass
A trait that represents a pseudo-class.
Parser
PseudoElement
A trait that represents a pseudo-element.
SelectorImpl
This trait allows to define the parser implementation in regards of pseudo-classes/elements

Functions§

is_css2_pseudo_element
Returns whether the name corresponds to a CSS2 pseudo-element that can be specified with the single colon syntax (in addition to the double-colon syntax, which can be used for all pseudo-elements).
namespace_empty_string

Type Aliases§

SelectorParseError