pub struct CSSStyle<'a> { /* private fields */ }Expand description
CSS style representation.
Implementations§
Source§impl<'a> CSSStyle<'a>
impl<'a> CSSStyle<'a>
Sourcepub fn builder(
css_properties: Vec<CSSProperty<'a>>,
shorthand_entries: Vec<ShorthandEntry<'a>>,
) -> CSSStyleBuilder<'a>
pub fn builder( css_properties: Vec<CSSProperty<'a>>, shorthand_entries: Vec<ShorthandEntry<'a>>, ) -> CSSStyleBuilder<'a>
Creates a builder for this type with the required parameters:
css_properties: CSS properties in the style.shorthand_entries: Computed values for all shorthands found in the style.
Sourcepub fn style_sheet_id(&self) -> Option<&StyleSheetId<'a>>
pub fn style_sheet_id(&self) -> Option<&StyleSheetId<'a>>
The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Sourcepub fn css_properties(&self) -> &[CSSProperty<'a>]
pub fn css_properties(&self) -> &[CSSProperty<'a>]
CSS properties in the style.
Sourcepub fn shorthand_entries(&self) -> &[ShorthandEntry<'a>]
pub fn shorthand_entries(&self) -> &[ShorthandEntry<'a>]
Computed values for all shorthands found in the style.
Sourcepub fn range(&self) -> Option<&SourceRange>
pub fn range(&self) -> Option<&SourceRange>
Style declaration range in the enclosing stylesheet (if available).
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for CSSStyle<'a>
impl<'de, 'a> Deserialize<'de> for CSSStyle<'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 CSSStyle<'a>
impl<'a> RefUnwindSafe for CSSStyle<'a>
impl<'a> Send for CSSStyle<'a>
impl<'a> Sync for CSSStyle<'a>
impl<'a> Unpin for CSSStyle<'a>
impl<'a> UnsafeUnpin for CSSStyle<'a>
impl<'a> UnwindSafe for CSSStyle<'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