struct SheetCollection<S>where
S: StylesheetInDocument + PartialEq + 'static,{
entries: Vec<StylesheetSetEntry<S>>,
data_validity: DataValidity,
dirty: bool,
}Fields§
§entries: Vec<StylesheetSetEntry<S>>The actual list of stylesheets.
This is only a list of top-level stylesheets, and as such it doesn’t
include recursive @import rules.
data_validity: DataValidityThe validity of the data that was already there for a given origin.
Note that an origin may appear on origins_dirty, but still have
DataValidity::Valid, if only sheets have been appended into it (in
which case the existing data is valid, but the origin needs to be
rebuilt).
dirty: boolWhether anything in the collection has changed. Note that this is
different from data_validity, in the sense that after a sheet append,
the data validity is still Valid, but we need to be marked as dirty.
Implementations§
Source§impl<S> SheetCollection<S>where
S: StylesheetInDocument + PartialEq + 'static,
impl<S> SheetCollection<S>where
S: StylesheetInDocument + PartialEq + 'static,
Sourcefn get(&self, index: usize) -> Option<&S>
fn get(&self, index: usize) -> Option<&S>
Returns the indexth stylesheet in the set if present.
fn find_sheet_index(&self, sheet: &S) -> Option<usize>
fn remove(&mut self, sheet: &S)
fn contains(&self, sheet: &S) -> bool
fn insert_before(&mut self, sheet: S, before_sheet: &S)
fn set_data_validity_at_least(&mut self, validity: DataValidity)
Sourcefn iter(&self) -> impl Iterator<Item = &S>
fn iter(&self) -> impl Iterator<Item = &S>
Returns an iterator over the current list of stylesheets.
Sourcefn iter_mut(&mut self) -> impl Iterator<Item = &mut S>
fn iter_mut(&mut self) -> impl Iterator<Item = &mut S>
Returns a mutable iterator over the current list of stylesheets.
fn flush(&mut self) -> SheetCollectionFlusher<'_, S>
Trait Implementations§
Source§impl<S> Default for SheetCollection<S>where
S: StylesheetInDocument + PartialEq + 'static,
impl<S> Default for SheetCollection<S>where
S: StylesheetInDocument + PartialEq + 'static,
Source§impl<S> MallocSizeOf for SheetCollection<S>
impl<S> MallocSizeOf for SheetCollection<S>
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl<S> Freeze for SheetCollection<S>
impl<S> RefUnwindSafe for SheetCollection<S>where
S: RefUnwindSafe,
impl<S> Send for SheetCollection<S>where
S: Send,
impl<S> Sync for SheetCollection<S>where
S: Sync,
impl<S> Unpin for SheetCollection<S>where
S: Unpin,
impl<S> UnwindSafe for SheetCollection<S>where
S: UnwindSafe,
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