[−][src]Trait metfor::Quantity
A quantity is a common super trait for types that represent units of measurement.
Required methods
fn pack(_: f64) -> Self
Create a new instance of self by wrapping a value
fn unpack(self) -> f64
Unpack a wrapped value without any error checking.
fn unwrap(self) -> f64
Unwrap the value from the new type and check for validity, panic if contents are invalid.
fn into_option(self) -> Option<f64>
Convert into an option that is None
if the content is invalid.
Provided methods
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
Self: From<RHS> + From<TOL> + Quantity,
Test whether these two values are close
fn abs(self) -> Self
Test whether these two values are close
Implementations on Foreign Types
impl Quantity for f64
[src]
fn pack(val: f64) -> f64
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for u8
[src]
fn pack(val: f64) -> u8
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
Implementors
impl Quantity for Celsius
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for CelsiusDiff
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for CelsiusPKm
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Cm
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Decameters
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Fahrenheit
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for FahrenheitDiff
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for FahrenheitPKft
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Feet
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for HectoPascal
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for HelicityMpS2
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for HydrolapseGPKgPKm
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for HydrolapsePKm
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Inches
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for IntHelicityM2pS2
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for JpKg
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for JpKgpK
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Kelvin
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Km
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for KmPHour
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Knots
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Meters
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for MetersPSec
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for MicroBarPS
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for MilesPHour
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Millibar
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,
fn abs(self) -> Self
[src]
impl Quantity for Mm
[src]
fn pack(val: f64) -> Self
[src]
fn unpack(self) -> f64
[src]
fn unwrap(self) -> f64
[src]
fn into_option(self) -> Option<f64>
[src]
fn approx_eq<RHS, TOL>(self, other: RHS, tol: TOL) -> bool where
Self: From<RHS> + From<TOL> + Quantity,
[src]
Self: From<RHS> + From<TOL> + Quantity,