Struct style::stylesheets::DocumentStyleSheet
source · pub struct DocumentStyleSheet(pub Arc<Stylesheet>);
Expand description
A simple wrapper over an Arc<Stylesheet>
, with pointer comparison, and
suitable for its use in a StylesheetSet
.
Tuple Fields§
§0: Arc<Stylesheet>
Trait Implementations§
source§impl Clone for DocumentStyleSheet
impl Clone for DocumentStyleSheet
source§fn clone(&self) -> DocumentStyleSheet
fn clone(&self) -> DocumentStyleSheet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DocumentStyleSheet
impl Debug for DocumentStyleSheet
source§impl MallocSizeOf for DocumentStyleSheet
impl MallocSizeOf for DocumentStyleSheet
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.
source§impl PartialEq for DocumentStyleSheet
impl PartialEq for DocumentStyleSheet
source§impl StylesheetInDocument for DocumentStyleSheet
impl StylesheetInDocument for DocumentStyleSheet
source§fn media<'a>(
&'a self,
guard: &'a SharedRwLockReadGuard<'_>,
) -> Option<&'a MediaList>
fn media<'a>( &'a self, guard: &'a SharedRwLockReadGuard<'_>, ) -> Option<&'a MediaList>
Get the media associated with this stylesheet.
source§fn contents(&self) -> &StylesheetContents
fn contents(&self) -> &StylesheetContents
Returns a reference to the contents of the stylesheet.
source§fn implicit_scope_root(&self) -> Option<ImplicitScopeRoot>
fn implicit_scope_root(&self) -> Option<ImplicitScopeRoot>
Return the implicit scope root for this stylesheet, if one exists.
source§fn rules<'a, 'b: 'a>(
&'a self,
guard: &'b SharedRwLockReadGuard<'_>,
) -> &'a [CssRule]
fn rules<'a, 'b: 'a>( &'a self, guard: &'b SharedRwLockReadGuard<'_>, ) -> &'a [CssRule]
Returns a reference to the list of rules in this stylesheet.
source§fn iter_rules<'a, 'b, C>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>,
) -> RulesIterator<'a, 'b, C> ⓘwhere
C: NestedRuleIterationCondition,
fn iter_rules<'a, 'b, C>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>,
) -> RulesIterator<'a, 'b, C> ⓘwhere
C: NestedRuleIterationCondition,
Return an iterator using the condition
C
.source§fn is_effective_for_device(
&self,
device: &Device,
guard: &SharedRwLockReadGuard<'_>,
) -> bool
fn is_effective_for_device( &self, device: &Device, guard: &SharedRwLockReadGuard<'_>, ) -> bool
Returns whether the style-sheet applies for the current device.
source§fn effective_rules<'a, 'b>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>,
) -> EffectiveRulesIterator<'a, 'b>
fn effective_rules<'a, 'b>( &'a self, device: &'a Device, guard: &'a SharedRwLockReadGuard<'b>, ) -> EffectiveRulesIterator<'a, 'b>
Return an iterator over the effective rules within the style-sheet, as
according to the supplied
Device
.Auto Trait Implementations§
impl Freeze for DocumentStyleSheet
impl !RefUnwindSafe for DocumentStyleSheet
impl Send for DocumentStyleSheet
impl Sync for DocumentStyleSheet
impl Unpin for DocumentStyleSheet
impl !UnwindSafe for DocumentStyleSheet
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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