Struct style::stylesheet_set::AuthorStylesheetSet
source · pub struct AuthorStylesheetSet<S>where
S: StylesheetInDocument + PartialEq + 'static,{
collection: SheetCollection<S>,
invalidations: StylesheetInvalidationSet,
}
Expand description
The set of stylesheets effective for a given Shadow Root.
Fields§
§collection: SheetCollection<S>
The actual style sheets.
invalidations: StylesheetInvalidationSet
The set of invalidations scheduled for this collection.
Implementations§
source§impl<S> AuthorStylesheetSet<S>where
S: StylesheetInDocument + PartialEq + 'static,
impl<S> AuthorStylesheetSet<S>where
S: StylesheetInDocument + PartialEq + 'static,
sourcepub fn get(&self, index: usize) -> Option<&S>
pub fn get(&self, index: usize) -> Option<&S>
Returns the index
th stylesheet in the collection of author styles if present.
fn collection_for(&mut self, _sheet: &S) -> &mut SheetCollection<S>
fn collect_invalidations_for( &mut self, device: Option<&Device>, sheet: &S, guard: &SharedRwLockReadGuard<'_>, )
sourcepub fn append_stylesheet(
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard<'_>,
)
pub fn append_stylesheet( &mut self, device: Option<&Device>, sheet: S, guard: &SharedRwLockReadGuard<'_>, )
Appends a new stylesheet to the current set.
No device implies not computing invalidations.
sourcepub fn insert_stylesheet_before(
&mut self,
device: Option<&Device>,
sheet: S,
before_sheet: S,
guard: &SharedRwLockReadGuard<'_>,
)
pub fn insert_stylesheet_before( &mut self, device: Option<&Device>, sheet: S, before_sheet: S, guard: &SharedRwLockReadGuard<'_>, )
Insert a given stylesheet before another stylesheet in the document.
sourcepub fn remove_stylesheet(
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard<'_>,
)
pub fn remove_stylesheet( &mut self, device: Option<&Device>, sheet: S, guard: &SharedRwLockReadGuard<'_>, )
Remove a given stylesheet from the set.
sourcepub fn rule_changed(
&mut self,
device: Option<&Device>,
sheet: &S,
rule: &CssRule,
guard: &SharedRwLockReadGuard<'_>,
change_kind: RuleChangeKind,
)
pub fn rule_changed( &mut self, device: Option<&Device>, sheet: &S, rule: &CssRule, guard: &SharedRwLockReadGuard<'_>, change_kind: RuleChangeKind, )
Notify the set that a rule from a given stylesheet has changed somehow.
sourcepub fn iter(&self) -> StylesheetCollectionIterator<'_, S> ⓘ
pub fn iter(&self) -> StylesheetCollectionIterator<'_, S> ⓘ
Iterate over the list of stylesheets.
sourcepub fn force_dirty(&mut self)
pub fn force_dirty(&mut self)
Mark the sheet set dirty, as appropriate.
sourcepub fn flush<E>(
&mut self,
host: Option<E>,
snapshots: Option<&SnapshotMap>,
) -> AuthorStylesheetFlusher<'_, S>where
E: TElement,
pub fn flush<E>(
&mut self,
host: Option<E>,
snapshots: Option<&SnapshotMap>,
) -> AuthorStylesheetFlusher<'_, S>where
E: TElement,
Flush the stylesheets for this author set.
host
is the root of the affected subtree, like the shadow host, for
example.
Trait Implementations§
source§impl<S> MallocSizeOf for AuthorStylesheetSet<S>
impl<S> MallocSizeOf for AuthorStylesheetSet<S>
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl<S> Freeze for AuthorStylesheetSet<S>
impl<S> RefUnwindSafe for AuthorStylesheetSet<S>where
S: RefUnwindSafe,
impl<S> Send for AuthorStylesheetSet<S>where
S: Send,
impl<S> Sync for AuthorStylesheetSet<S>where
S: Sync,
impl<S> Unpin for AuthorStylesheetSet<S>where
S: Unpin,
impl<S> UnwindSafe for AuthorStylesheetSet<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
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