pub struct RelativeSelectorDependencyCollector<'a, E>where
E: TElement,{
dependencies: FxHashMap<E, SmallVec<[(Option<OpaqueElement>, &'a Dependency); 1]>>,
invalidations: SmallVec<[(E, Option<OpaqueElement>, &'a Dependency); 2]>,
top: E,
optimization_context: Option<OptimizationContext<'a, E>>,
}
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<[(E, Option<OpaqueElement>, &'a Dependency); 2]>
Dependencies that created an invalidation right away.
top: E
The 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.
Implementations§
source§impl<'a, E> RelativeSelectorDependencyCollector<'a, E>where
E: TElement,
impl<'a, E> RelativeSelectorDependencyCollector<'a, E>where
E: TElement,
fn new(top: E, optimization_context: Option<OptimizationContext<'a, E>>) -> 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 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 RelativeSelectorInvalidationMap, operation: DomMutationOperation, )
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<'a, E> Freeze for RelativeSelectorDependencyCollector<'a, E>where
E: Freeze,
impl<'a, E> RefUnwindSafe for RelativeSelectorDependencyCollector<'a, E>where
E: RefUnwindSafe,
impl<'a, E> Send for RelativeSelectorDependencyCollector<'a, E>
impl<'a, E> Sync for RelativeSelectorDependencyCollector<'a, E>where
E: Sync,
impl<'a, E> Unpin for RelativeSelectorDependencyCollector<'a, E>where
E: Unpin,
impl<'a, E> UnwindSafe for RelativeSelectorDependencyCollector<'a, E>where
E: UnwindSafe + RefUnwindSafe,
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