Struct metron::measure::Measure [−][src]
pub struct Measure<N, M> { /* fields omitted */ }
Expand description
provide any arithmetic operation for number with measurement.
Implementations
impl basic func
impl<N, USelf> Measure<N, USelf> where
N: Mul<<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base as Pow<<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent as Sub<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>>::Output>>::Output, Output = N>,
USelf: Unit + ExponentialScaledUnit,
<USelf as ExponentialScaledUnit>::ExponentialScale: ExponentialScale<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase>,
<USelf as ExponentialScaledUnit>::ExponentialScale: ExponentialScaleDefault,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScale<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase>>::ScaleExponent: ScaleExponent<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase: ScaleBase<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base: Pow<<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent as Sub<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>>::Output>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent: PartialOrd<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent: Sub<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
[src]
impl<N, USelf> Measure<N, USelf> where
N: Mul<<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base as Pow<<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent as Sub<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>>::Output>>::Output, Output = N>,
USelf: Unit + ExponentialScaledUnit,
<USelf as ExponentialScaledUnit>::ExponentialScale: ExponentialScale<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase>,
<USelf as ExponentialScaledUnit>::ExponentialScale: ExponentialScaleDefault,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScale<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase>>::ScaleExponent: ScaleExponent<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase: ScaleBase<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base: Pow<<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent as Sub<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>>::Output>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent: PartialOrd<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent: Sub<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
[src]pub fn from_scale<UFrom>(from: Measure<N, UFrom>) -> Measure<N, USelf> where
UFrom: Unit + ExponentialScaledUnit<BaseUnit = <USelf as ExponentialScaledUnit>::BaseUnit>,
<UFrom as ExponentialScaledUnit>::ExponentialScale: ExponentialScale<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase>,
<<UFrom as ExponentialScaledUnit>::ExponentialScale as ExponentialScale<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase>>::ScaleExponent: ScaleExponent<<<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent>,
<UFrom as ExponentialScaledUnit>::ExponentialScale: ExponentialScaleDefault,
<<UFrom as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase == <<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::ScaleBase,
<<UFrom as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base == <<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Base,
<<UFrom as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent == <<USelf as ExponentialScaledUnit>::ExponentialScale as ExponentialScaleDefault>::Exponent,
[src]Trait Implementations
Performs the +=
operation. Read more
impl<NSelf, USelf, Rhs> Div<Rhs> for Measure<NSelf, USelf> where
Rhs: IntoMeasure,
NSelf: Div<<Rhs as IntoMeasure>::Num>,
USelf: Unit + DivMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>,
[src]
impl<NSelf, USelf, Rhs> Div<Rhs> for Measure<NSelf, USelf> where
Rhs: IntoMeasure,
NSelf: Div<<Rhs as IntoMeasure>::Num>,
USelf: Unit + DivMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>,
[src]type Output = Measure<<NSelf as Div<<Rhs as IntoMeasure>::Num>>::Output, <USelf as DivMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>>::Output>
type Output = Measure<<NSelf as Div<<Rhs as IntoMeasure>::Num>>::Output, <USelf as DivMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>>::Output>
The resulting type after applying the /
operator.
Performs the /=
operation. Read more
type Num = N
type Unit = U
pub fn into_measure(
self
) -> Measure<<Measure<N, U> as IntoMeasure>::Num, <Measure<N, U> as IntoMeasure>::Unit> where
Measure<N, U>: Sized,
[src]impl<NSelf, USelf, Rhs> Mul<Rhs> for Measure<NSelf, USelf> where
Rhs: IntoMeasure,
NSelf: Mul<<Rhs as IntoMeasure>::Num>,
USelf: Unit + MulMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>,
[src]
impl<NSelf, USelf, Rhs> Mul<Rhs> for Measure<NSelf, USelf> where
Rhs: IntoMeasure,
NSelf: Mul<<Rhs as IntoMeasure>::Num>,
USelf: Unit + MulMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>,
[src]type Output = Measure<<NSelf as Mul<<Rhs as IntoMeasure>::Num>>::Output, <USelf as MulMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>>::Output>
type Output = Measure<<NSelf as Mul<<Rhs as IntoMeasure>::Num>>::Output, <USelf as MulMeasure<<Rhs as IntoMeasure>::Unit, NSelf, <Rhs as IntoMeasure>::Num>>::Output>
The resulting type after applying the *
operator.
Performs the *=
operation. Read more
impl<N, M> PartialOrd<Measure<N, M>> for Measure<N, M> where
N: PartialOrd<N>,
Measure<N, M>: PartialEq<Measure<N, M>>,
[src]
impl<N, M> PartialOrd<Measure<N, M>> for Measure<N, M> where
N: PartialOrd<N>,
Measure<N, M>: PartialEq<Measure<N, M>>,
[src]This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Performs the %=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl<N, M> RefUnwindSafe for Measure<N, M> where
M: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, M> UnwindSafe for Measure<N, M> where
M: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more