[][src]Trait fts_units::quantity::CastAmount

pub trait CastAmount<T> {
    fn cast_from(v: T) -> Self;
fn cast_into(self) -> T; }

Helpers for casting T in QuantityT<T,U>.

let m = Meters::<f32>::new(7.73);
let i : Meters<i32> = m.cast_into();
assert_eq!(i.amount(), 7);

Required methods

fn cast_from(v: T) -> Self

fn cast_into(self) -> T

Loading content...

Implementors

impl<T1, T2, U> CastAmount<QuantityT<T2, U>> for QuantityT<T1, U> where
    T1: Amount + NumCast,
    T2: Amount + NumCast
[src]

Loading content...