pub struct ComputedStyle {
pub color: Option<CssValue>,
pub background_color: Option<CssValue>,
pub padding: Option<f32>,
pub margin: Option<f32>,
pub font_size: Option<f32>,
pub font_weight: Option<f32>,
pub border_color: Option<CssValue>,
pub border_width: Option<f32>,
pub opacity: Option<f32>,
}Expand description
A set of parsed CSS declarations for a single element or rule block.
Fields§
§color: Option<CssValue>The color property (text / foreground colour).
background_color: Option<CssValue>The background-color / background property.
padding: Option<f32>The padding property in logical pixels.
margin: Option<f32>The margin property in logical pixels.
font_size: Option<f32>The font-size property in logical pixels.
font_weight: Option<f32>The font-weight property (e.g. 400, 700).
border_color: Option<CssValue>The border-color property.
border_width: Option<f32>The border-width property in logical pixels.
opacity: Option<f32>The opacity property in the range [0.0, 1.0].
Trait Implementations§
Source§impl Clone for ComputedStyle
impl Clone for ComputedStyle
Source§fn clone(&self) -> ComputedStyle
fn clone(&self) -> ComputedStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ComputedStyle
impl Debug for ComputedStyle
Source§impl Default for ComputedStyle
impl Default for ComputedStyle
Source§fn default() -> ComputedStyle
fn default() -> ComputedStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for ComputedStyle
impl PartialEq for ComputedStyle
Source§fn eq(&self, other: &ComputedStyle) -> bool
fn eq(&self, other: &ComputedStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ComputedStyle
Auto Trait Implementations§
impl Freeze for ComputedStyle
impl RefUnwindSafe for ComputedStyle
impl Send for ComputedStyle
impl Sync for ComputedStyle
impl Unpin for ComputedStyle
impl UnsafeUnpin for ComputedStyle
impl UnwindSafe for ComputedStyle
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