pub struct Numeric {
pub value: f64,
pub is_integer: bool,
}Expand description
A numeric value carried by <number-token>, <percentage-token>,
and <dimension-token> (§4.3.13).
Per §4.3.13 “Consume a number”, the numeric value is parsed as either an integer or a floating-point value, and a flag records which kind was found. The sign is included in the value.
Fields§
§value: f64The parsed numeric value.
is_integer: boolWhether the source representation had a . or scientific-notation
exponent, making it a “number” rather than an “integer”. Per
§4.3.13 this flag is set when the number’s representation includes
a fractional component or an e/E exponent.
Trait Implementations§
impl StructuralPartialEq for Numeric
Auto Trait Implementations§
impl Forget for Numeric
impl Freeze for Numeric
impl RefUnwindSafe for Numeric
impl Send for Numeric
impl Sync for Numeric
impl Unpin for Numeric
impl UnsafeUnpin for Numeric
impl UnwindSafe for Numeric
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