[−][src]Trait fts_units::quantity::ConvertUnits
Helper for converting units. For example from Meters to Kilometers.
let d = Kilometers::new(15.3); let t = Hours::new(2.7); let kph : KilometersPerHour = d / t; let mps : MetersPerSecond = kph.convert_into(); let mps = MetersPerSecond::convert_from(kph);
Required methods
fn convert_from(v: T) -> Self
fn convert_into(self) -> T
Implementors
impl<T, R1, R2, E> ConvertUnits<QuantityT<T, SIUnitsT<R1, E>>> for QuantityT<T, SIUnitsT<R2, E>> where
T: Amount,
AmountT<T>: Mul<SIUnitsT<R1, E>, Output = AmountT<T>> + Div<SIUnitsT<R1, E>, Output = AmountT<T>> + Mul<SIUnitsT<R2, E>, Output = AmountT<T>> + Div<SIUnitsT<R2, E>, Output = AmountT<T>>,
R1: SIRatios,
R2: SIRatios,
E: SIExponents,
[src]
T: Amount,
AmountT<T>: Mul<SIUnitsT<R1, E>, Output = AmountT<T>> + Div<SIUnitsT<R1, E>, Output = AmountT<T>> + Mul<SIUnitsT<R2, E>, Output = AmountT<T>> + Div<SIUnitsT<R2, E>, Output = AmountT<T>>,
R1: SIRatios,
R2: SIRatios,
E: SIExponents,