Struct style::stylist::StylistStylesheetSet
source · struct StylistStylesheetSet(DocumentStylesheetSet<StylistSheet>);
Expand description
A wrapper over a DocumentStylesheetSet that can be Sync
, since it’s only
used and exposed via mutable methods in the Stylist
.
Tuple Fields§
§0: DocumentStylesheetSet<StylistSheet>
Implementations§
Methods from Deref<Target = DocumentStylesheetSet<StylistSheet>>§
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 sheet_count(&self, origin: Origin) -> usize
pub fn sheet_count(&self, origin: Origin) -> usize
Returns the count of stylesheets for a given origin.
sourcepub fn get(&self, origin: Origin, index: usize) -> Option<&S>
pub fn get(&self, origin: Origin, index: usize) -> Option<&S>
Returns the index
th stylesheet in the set for the given origin.
sourcepub fn has_changed(&self) -> bool
pub fn has_changed(&self) -> bool
Returns whether the given set has changed from the last flush.
sourcepub fn flush<E>(
&mut self,
document_element: Option<E>,
snapshots: Option<&SnapshotMap>,
) -> DocumentStylesheetFlusher<'_, S>where
E: TElement,
pub fn flush<E>(
&mut self,
document_element: Option<E>,
snapshots: Option<&SnapshotMap>,
) -> DocumentStylesheetFlusher<'_, S>where
E: TElement,
Flush the current set, unmarking it as dirty, and returns a
DocumentStylesheetFlusher
in order to rebuild the stylist.
sourcepub fn flush_without_invalidation(&mut self) -> OriginSet
pub fn flush_without_invalidation(&mut self) -> OriginSet
Flush stylesheets, but without running any of the invalidation passes.
sourcepub fn iter(&self) -> StylesheetIterator<'_, S> ⓘ
pub fn iter(&self) -> StylesheetIterator<'_, S> ⓘ
Return an iterator over the flattened view of all the stylesheets.
sourcepub fn force_dirty(&mut self, origins: OriginSet)
pub fn force_dirty(&mut self, origins: OriginSet)
Mark the stylesheets for the specified origin as dirty, because something external may have invalidated it.
Trait Implementations§
source§impl DerefMut for StylistStylesheetSet
impl DerefMut for StylistStylesheetSet
source§impl MallocSizeOf for StylistStylesheetSet
impl MallocSizeOf for StylistStylesheetSet
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl Deref for StylistStylesheetSet
impl Deref for StylistStylesheetSet
§type Target = DocumentStylesheetSet<DocumentStyleSheet>
type Target = DocumentStylesheetSet<DocumentStyleSheet>
impl Sync for StylistStylesheetSet
Auto Trait Implementations§
impl Freeze for StylistStylesheetSet
impl !RefUnwindSafe for StylistStylesheetSet
impl Send for StylistStylesheetSet
impl Unpin for StylistStylesheetSet
impl !UnwindSafe for StylistStylesheetSet
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