pub struct RelativeSelectorDependencyCollector<'a, 's, E>where
E: TElement,{
dependencies: FxHashMap<E, SmallVec<[(Option<OpaqueElement>, &'a Dependency); 1]>>,
invalidations: SmallVec<[AlreadyInvalidatedEntry<'a, E>; 2]>,
top: E,
optimization_context: Option<OptimizationContext<'a, E>>,
quirks_mode: QuirksMode,
snapshots: Option<&'a Snapshots<'s>>,
}Expand description
Interface for collecting relative selector dependencies.
Fields§
§dependencies: FxHashMap<E, SmallVec<[(Option<OpaqueElement>, &'a Dependency); 1]>>Dependencies that need to run through the normal invalidation that may generate a relative selector invalidation.
invalidations: SmallVec<[AlreadyInvalidatedEntry<'a, E>; 2]>Dependencies that created an invalidation right away.
top: EThe top element in the subtree being invalidated.
optimization_context: Option<OptimizationContext<'a, E>>Optional context that will be used to try and skip invalidations by running selector matches.
quirks_mode: QuirksMode§snapshots: Option<&'a Snapshots<'s>>Snapshots map, if not in the context of DOM mutation.
Implementations§
Source§impl<'a, 's, E> RelativeSelectorDependencyCollector<'a, 's, E>where
E: TElement,
impl<'a, 's, E> RelativeSelectorDependencyCollector<'a, 's, E>where
E: TElement,
fn new( top: E, quirks_mode: QuirksMode, optimization_context: Option<OptimizationContext<'a, E>>, snapshots: Option<&'a Snapshots<'s>>, ) -> Self
fn insert_invalidation( &mut self, element: E, dependency: &'a Dependency, host: Option<OpaqueElement>, )
Sourcepub fn add_dependency(
&mut self,
dependency: &'a Dependency,
element: E,
host: Option<OpaqueElement>,
)
pub fn add_dependency( &mut self, dependency: &'a Dependency, element: E, host: Option<OpaqueElement>, )
Add this dependency, if it is unique (i.e. Different outer dependency or same outer dependency but requires a different invalidation traversal).
Sourcefn compound_may_be_different(
quirks_mode: QuirksMode,
dependency: &'a Dependency,
element: E,
host: Option<OpaqueElement>,
snapshots: &Snapshots<'s>,
) -> bool
fn compound_may_be_different( quirks_mode: QuirksMode, dependency: &'a Dependency, element: E, host: Option<OpaqueElement>, snapshots: &Snapshots<'s>, ) -> bool
Check for a quick exit for the invalidation initiating element. Dependencies up the chain are checked by the invalidator.
Sourcefn get(self) -> ToInvalidate<'a, E>
fn get(self) -> ToInvalidate<'a, E>
Get the dependencies in a list format.
fn collect_all_dependencies_for_element( &mut self, element: E, scope: Option<OpaqueElement>, quirks_mode: QuirksMode, map: &'a InvalidationMap, additional_relative_selector_invalidation_map: &'a AdditionalRelativeSelectorInvalidationMap, operation: DomMutationOperation, )
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<'a, 's, E> !RefUnwindSafe for RelativeSelectorDependencyCollector<'a, 's, E>
impl<'a, 's, E> !Send for RelativeSelectorDependencyCollector<'a, 's, E>
impl<'a, 's, E> !Sync for RelativeSelectorDependencyCollector<'a, 's, E>
impl<'a, 's, E> !UnwindSafe for RelativeSelectorDependencyCollector<'a, 's, E>
impl<'a, 's, E> Freeze for RelativeSelectorDependencyCollector<'a, 's, E>where
E: Freeze,
impl<'a, 's, E> Unpin for RelativeSelectorDependencyCollector<'a, 's, E>where
E: Unpin,
impl<'a, 's, E> UnsafeUnpin for RelativeSelectorDependencyCollector<'a, 's, E>where
E: UnsafeUnpin,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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