pub struct RuleUsage<'a> { /* private fields */ }Expand description
CSS coverage information.
Implementations§
Source§impl<'a> RuleUsage<'a>
impl<'a> RuleUsage<'a>
Sourcepub fn builder(
style_sheet_id: StyleSheetId<'a>,
start_offset: f64,
end_offset: f64,
used: bool,
) -> RuleUsageBuilder<'a>
pub fn builder( style_sheet_id: StyleSheetId<'a>, start_offset: f64, end_offset: f64, used: bool, ) -> RuleUsageBuilder<'a>
Creates a builder for this type with the required parameters:
style_sheet_id: The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.start_offset: Offset of the start of the rule (including selector) from the beginning of the stylesheet.end_offset: Offset of the end of the rule body from the beginning of the stylesheet.used: Indicates whether the rule was actually used by some element in the page.
Sourcepub fn style_sheet_id(&self) -> &StyleSheetId<'a>
pub fn style_sheet_id(&self) -> &StyleSheetId<'a>
The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Sourcepub fn start_offset(&self) -> f64
pub fn start_offset(&self) -> f64
Offset of the start of the rule (including selector) from the beginning of the stylesheet.
Sourcepub fn end_offset(&self) -> f64
pub fn end_offset(&self) -> f64
Offset of the end of the rule body from the beginning of the stylesheet.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for RuleUsage<'a>
impl<'de, 'a> Deserialize<'de> for RuleUsage<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for RuleUsage<'a>
impl<'a> RefUnwindSafe for RuleUsage<'a>
impl<'a> Send for RuleUsage<'a>
impl<'a> Sync for RuleUsage<'a>
impl<'a> Unpin for RuleUsage<'a>
impl<'a> UnsafeUnpin for RuleUsage<'a>
impl<'a> UnwindSafe for RuleUsage<'a>
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