#[repr(C)]pub struct UnitValue {
pub value: f32,
pub unit: CssString,
}Expand description
A single numeric value with an associated unit.
This corresponds to CSSUnitValue in the Typed OM specification. The
numeric component is stored separately from the textual unit identifier.
Fields§
§value: f32The numeric component of the value.
unit: CssStringThe textual unit string (e.g. "px", "em", "%", "deg").
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnitValue
impl RefUnwindSafe for UnitValue
impl Send for UnitValue
impl Sync for UnitValue
impl Unpin for UnitValue
impl UnwindSafe for UnitValue
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