pub struct Number {
pub value: d128,
pub unit: Unit,
}
Expand description
A number with a Unit
.
Example:
use cpc::{eval,Number};
use cpc::units::Unit;
use decimal::d128;
let x = Number {
value: d128!(100),
unit: Unit::Meter,
};
Fields§
§value: d128
The number part of a Number
struct
unit: Unit
Implementations§
Trait Implementations§
source§impl PartialEq<Number> for Number
impl PartialEq<Number> for Number
impl StructuralPartialEq for Number
Auto Trait Implementations§
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin 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