Struct style::stylesheets::scope_rule::ScopeSubjectMap
source · pub struct ScopeSubjectMap {
buckets: SimpleBucketsMap<()>,
any: bool,
}
Expand description
A map containing simple selectors in subjects of scope selectors. This allows fast-rejecting scopes before running the full match.
Fields§
§buckets: SimpleBucketsMap<()>
§any: bool
Implementations§
source§impl ScopeSubjectMap
impl ScopeSubjectMap
sourcepub fn add_bound_start(
&mut self,
selectors: &SelectorList<SelectorImpl>,
quirks_mode: QuirksMode,
)
pub fn add_bound_start( &mut self, selectors: &SelectorList<SelectorImpl>, quirks_mode: QuirksMode, )
Add the <scope-start>
of a scope.
fn add_selector_list( &mut self, selectors: &SelectorList<SelectorImpl>, quirks_mode: QuirksMode, ) -> bool
fn add_selector( &mut self, selector: &Selector<SelectorImpl>, quirks_mode: QuirksMode, ) -> bool
sourcepub fn shrink_if_needed(&mut self)
pub fn shrink_if_needed(&mut self)
Shrink the map as much as possible.
sourcefn early_reject<E: TElement>(&self, element: E, quirks_mode: QuirksMode) -> bool
fn early_reject<E: TElement>(&self, element: E, quirks_mode: QuirksMode) -> bool
Could a given element possibly be a scope root?
Trait Implementations§
source§impl Clone for ScopeSubjectMap
impl Clone for ScopeSubjectMap
source§fn clone(&self) -> ScopeSubjectMap
fn clone(&self) -> ScopeSubjectMap
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ScopeSubjectMap
impl Debug for ScopeSubjectMap
source§impl Default for ScopeSubjectMap
impl Default for ScopeSubjectMap
source§fn default() -> ScopeSubjectMap
fn default() -> ScopeSubjectMap
Returns the “default value” for a type. Read more
source§impl MallocSizeOf for ScopeSubjectMap
impl MallocSizeOf for ScopeSubjectMap
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for ScopeSubjectMap
impl RefUnwindSafe for ScopeSubjectMap
impl Send for ScopeSubjectMap
impl Sync for ScopeSubjectMap
impl Unpin for ScopeSubjectMap
impl UnwindSafe for ScopeSubjectMap
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert