pub struct RelativeSelectorFilterMap {
map: FxHashMap<Key, Entry>,
}
Expand description
Map of bloom filters for fast-rejecting relative selectors.
Fields§
§map: FxHashMap<Key, Entry>
Implementations§
source§impl RelativeSelectorFilterMap
impl RelativeSelectorFilterMap
fn get_filter<E: Element>( &mut self, element: &E, kind: TraversalKind, ) -> Option<&BloomFilter>
sourcepub fn fast_reject<Impl: SelectorImpl, E: Element>(
&mut self,
element: &E,
selector: &RelativeSelector<Impl>,
quirks_mode: QuirksMode,
) -> bool
pub fn fast_reject<Impl: SelectorImpl, E: Element>( &mut self, element: &E, selector: &RelativeSelector<Impl>, quirks_mode: QuirksMode, ) -> bool
Potentially reject the given selector for this element. This may seem redundant in presence of the cache, but the cache keys into the selector-element pair specifically, while this filter keys to the element and the traversal kind, so it is useful for handling multiple selectors that effectively end up looking at the same(-ish, for siblings) subtree.
Trait Implementations§
source§impl Default for RelativeSelectorFilterMap
impl Default for RelativeSelectorFilterMap
source§fn default() -> RelativeSelectorFilterMap
fn default() -> RelativeSelectorFilterMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RelativeSelectorFilterMap
impl RefUnwindSafe for RelativeSelectorFilterMap
impl Send for RelativeSelectorFilterMap
impl Sync for RelativeSelectorFilterMap
impl Unpin for RelativeSelectorFilterMap
impl UnwindSafe for RelativeSelectorFilterMap
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