pub struct Number {
pub val: f64,
pub unit: Option<String>,
}Expand description
Haystack Number — a 64-bit float with optional unit string.
Equality requires both val and unit to match.
NaN != NaN (IEEE 754 semantics).
Display uses compact format: no trailing zeros, unit appended directly.
Fields§
§val: f64§unit: Option<String>Implementations§
Trait Implementations§
Source§impl PartialOrd for Number
impl PartialOrd for Number
impl Eq for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnsafeUnpin for Number
impl UnwindSafe for Number
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