#[repr(C)]pub enum NumericValue {
Unit(UnitValue),
Sum(MathSum),
}Expand description
A numeric value used by the Typed OM.
This corresponds to CSSNumericValue and its subclasses in the Typed OM
specification. It represents numbers that can appear in CSS values,
including both simple unit quantities and composite expressions..
Unlike the parser-level representation, NumericValue is property-agnostic
and suitable for conversion to or from the CSSNumericValue family of DOM
objects.
Variants§
Unit(UnitValue)
A single numeric value with a concrete unit.
This corresponds to CSSUnitValue.
Sum(MathSum)
A sum of numeric values.
This corresponds to CSSMathSum.
Trait Implementations§
Source§impl Clone for NumericValue
impl Clone for NumericValue
Source§fn clone(&self) -> NumericValue
fn clone(&self) -> NumericValue
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for NumericValue
impl RefUnwindSafe for NumericValue
impl Send for NumericValue
impl Sync for NumericValue
impl Unpin for NumericValue
impl UnwindSafe for NumericValue
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