Trait metfor::Quantity [−][src]
pub trait Quantity: Copy + Debug + Sized { fn pack(_: f64) -> Self; fn unpack(self) -> f64; fn unwrap(self) -> f64; fn into_option(self) -> Option<f64>; fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool
where
Self: From<RHS> + From<TOL> + Quantity, { ... } fn abs(self) -> Self { ... } }
Expand description
A quantity is a common super trait for types that represent units of measurement.
Required methods
Unwrap the value from the new type and check for validity, panic if contents are invalid.
fn into_option(self) -> Option<f64>
[src]
fn into_option(self) -> Option<f64>
[src]Convert into an option that is None
if the content is invalid.
Provided methods
Test whether these two values are close