Struct style::stylesheet_set::SheetCollectionFlusher
source · pub struct SheetCollectionFlusher<'a, S>where
S: StylesheetInDocument + PartialEq + 'static,{
entries: &'a mut [StylesheetSetEntry<S>],
validity: DataValidity,
dirty: bool,
}
Expand description
A flusher struct for a given collection, that takes care of returning the appropriate stylesheets that need work.
Fields§
§entries: &'a mut [StylesheetSetEntry<S>]
§validity: DataValidity
§dirty: bool
Implementations§
source§impl<'a, S> SheetCollectionFlusher<'a, S>where
S: StylesheetInDocument + PartialEq + 'static,
impl<'a, S> SheetCollectionFlusher<'a, S>where
S: StylesheetInDocument + PartialEq + 'static,
sourcepub fn data_validity(&self) -> DataValidity
pub fn data_validity(&self) -> DataValidity
What the state of the sheet data is.
source§impl<'a, S> SheetCollectionFlusher<'a, S>where
S: StylesheetInDocument + PartialEq + 'static,
impl<'a, S> SheetCollectionFlusher<'a, S>where
S: StylesheetInDocument + PartialEq + 'static,
sourcepub fn each(self, callback: impl FnMut(usize, &S, SheetRebuildKind) -> bool)
pub fn each(self, callback: impl FnMut(usize, &S, SheetRebuildKind) -> bool)
Iterates over all sheets and values that we have to invalidate.
TODO(emilio): This would be nicer as an iterator but we can’t do that until https://github.com/rust-lang/rust/pull/82771 stabilizes.
Since we don’t have a good use-case for partial iteration, this does the trick for now.
Auto Trait Implementations§
impl<'a, S> Freeze for SheetCollectionFlusher<'a, S>
impl<'a, S> RefUnwindSafe for SheetCollectionFlusher<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for SheetCollectionFlusher<'a, S>where
S: Send,
impl<'a, S> Sync for SheetCollectionFlusher<'a, S>where
S: Sync,
impl<'a, S> Unpin for SheetCollectionFlusher<'a, S>
impl<'a, S> !UnwindSafe for SheetCollectionFlusher<'a, S>
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