pub struct RelativeSelectorInvalidator<'a, 'b, E>where
    E: TElement + 'a,{
    pub element: E,
    pub quirks_mode: QuirksMode,
    pub snapshot_table: Option<&'b SnapshotMap>,
    pub invalidated: fn(E, &InvalidationResult),
    pub sibling_traversal_map: SiblingTraversalMap<E>,
    pub _marker: PhantomData<&'a ()>,
}Expand description
Overall invalidator for handling relative selector invalidations.
Fields§
§element: EElement triggering the invalidation.
quirks_mode: QuirksModeQuirks mode of the current invalidation.
snapshot_table: Option<&'b SnapshotMap>Snapshot containing changes to invalidate against. Can be None if it’s a DOM mutation.
invalidated: fn(E, &InvalidationResult)Callback to trigger when the subject element is invalidated.
sibling_traversal_map: SiblingTraversalMap<E>The traversal map that should be used to process invalidations.
_marker: PhantomData<&'a ()>Marker for ’a lifetime.
Implementations§
Source§impl<'a, 'b, E> RelativeSelectorInvalidator<'a, 'b, E>where
    E: TElement + 'a,
 
impl<'a, 'b, E> RelativeSelectorInvalidator<'a, 'b, E>where
    E: TElement + 'a,
Sourcepub fn invalidate_relative_selectors_for_this<F>(
    self,
    stylist: &'a Stylist,
    gather_dependencies: F,
)where
    F: FnMut(&E, Option<OpaqueElement>, &'a CascadeData, QuirksMode, &mut RelativeSelectorDependencyCollector<'a, E>),
 
pub fn invalidate_relative_selectors_for_this<F>(
    self,
    stylist: &'a Stylist,
    gather_dependencies: F,
)where
    F: FnMut(&E, Option<OpaqueElement>, &'a CascadeData, QuirksMode, &mut RelativeSelectorDependencyCollector<'a, E>),
Gather relative selector dependencies for the given element, and invalidate as necessary.
Sourcepub fn invalidate_relative_selectors_for_dom_mutation(
    self,
    subtree: bool,
    stylist: &'a Stylist,
    inherited_search_path: ElementSelectorFlags,
    operation: DomMutationOperation,
)
 
pub fn invalidate_relative_selectors_for_dom_mutation( self, subtree: bool, stylist: &'a Stylist, inherited_search_path: ElementSelectorFlags, operation: DomMutationOperation, )
Gather relative selector dependencies for the given element (And its subtree) that mutated, and invalidate as necessary.
Sourcefn invalidate_from_dependencies(&self, to_invalidate: ToInvalidate<'a, E>)
 
fn invalidate_from_dependencies(&self, to_invalidate: ToInvalidate<'a, E>)
Carry out complete invalidation triggered by a relative selector invalidation.
fn invalidate_upwards( &self, element: E, invalidation: &RelativeSelectorInvalidation<'a>, )
Sourcefn in_search_direction(element: &E, desired: ElementSelectorFlags) -> bool
 
fn in_search_direction(element: &E, desired: ElementSelectorFlags) -> bool
Is this element in the direction of the given relative selector search path?
Sourcefn handle_anchor(
    &self,
    element: E,
    outer_dependency: &Dependency,
    host: Option<OpaqueElement>,
)
 
fn handle_anchor( &self, element: E, outer_dependency: &Dependency, host: Option<OpaqueElement>, )
Handle a potential relative selector anchor.
Sourcefn is_subject(outer_dependency: &Dependency) -> bool
 
fn is_subject(outer_dependency: &Dependency) -> bool
Does this relative selector dependency have its relative selector in the subject position?
Auto Trait Implementations§
impl<'a, 'b, E> Freeze for RelativeSelectorInvalidator<'a, 'b, E>where
    E: Freeze,
impl<'a, 'b, E> !RefUnwindSafe for RelativeSelectorInvalidator<'a, 'b, E>
impl<'a, 'b, E> Send for RelativeSelectorInvalidator<'a, 'b, E>where
    E: Send,
impl<'a, 'b, E> Sync for RelativeSelectorInvalidator<'a, 'b, E>where
    E: Sync,
impl<'a, 'b, E> Unpin for RelativeSelectorInvalidator<'a, 'b, E>where
    E: Unpin,
impl<'a, 'b, E> !UnwindSafe for RelativeSelectorInvalidator<'a, 'b, E>
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
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>
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>
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 more