Struct style::stylesheets::stylesheet::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<DocumentStyleSheet> for DocumentStyleSheet
impl PartialEq<DocumentStyleSheet> 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 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
.fn effective_style_rules<F>(
&self,
device: &Device,
guard: &SharedRwLockReadGuard<'_>,
f: F
)where
F: FnMut(&StyleRule),
fn effective_font_face_rules<F>(
&self,
device: &Device,
guard: &SharedRwLockReadGuard<'_>,
f: F
)where
F: FnMut(&FontFaceRule),
fn effective_viewport_rules<F>(
&self,
device: &Device,
guard: &SharedRwLockReadGuard<'_>,
f: F
)where
F: FnMut(&ViewportRule),
Auto Trait Implementations§
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
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