[][src]Struct fts_units::si_system::SIUnitsT

pub struct SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
{ /* fields omitted */ }

Foundational type of si_system. Holds all Ratios and Exponents as types.

Trait Implementations

impl<R, E> Reduce for SIUnitsT<R, E> where
    R: SIRatios + ReduceWith<E>,
    E: SIExponents,
    ReduceWithOutput<R, E>: SIRatios,
    SIUnitsT<ReduceWithOutput<R, E>, E>: Default
[src]

type Output = SIUnitsT<ReduceWithOutput<R, E>, E>

impl<R, E> Invert for SIUnitsT<R, E> where
    R: SIRatios,
    E: SIExponents,
    Dimensionless: Div<Self>,
    DivOutput<Dimensionless, Self>: Default
[src]

type Output = DivOutput<Dimensionless, Self>

impl<R, E> Sqrt for SIUnitsT<R, E> where
    R: SIRatios,
    E: SIExponents,
    E::Length: PartialDiv<P2>,
    E::Mass: PartialDiv<P2>,
    E::Time: PartialDiv<P2>,
    <E::Length as PartialDiv<P2>>::Output: Integer,
    <E::Mass as PartialDiv<P2>>::Output: Integer,
    <E::Time as PartialDiv<P2>>::Output: Integer,
    SIUnitsT<R, SIExponentsT<<E::Length as PartialDiv<P2>>::Output, <E::Mass as PartialDiv<P2>>::Output, <E::Time as PartialDiv<P2>>::Output>>: Default
[src]

type Output = SIUnitsT<R, SIExponentsT<<E::Length as PartialDiv<P2>>::Output, <E::Mass as PartialDiv<P2>>::Output, <E::Time as PartialDiv<P2>>::Output>>

impl<R0, E0, R1, E1> Xor<SIUnitsT<R1, E1>> for SIUnitsT<R0, E0> where
    R0: SIRatios + Xor<R1>,
    E0: SIExponents + Xor<E1>,
    R1: SIRatios,
    E1: SIExponents,
    XorOutput<R0, R1>: SIRatios,
    XorOutput<E0, E1>: SIExponents,
    SIUnitsT<XorOutput<R0, R1>, XorOutput<E0, E1>>: Default
[src]

type Output = SIUnitsT<XorOutput<R0, R1>, XorOutput<E0, E1>>

impl<R, E> SIUnits for SIUnitsT<R, E> where
    R: SIRatios,
    E: SIExponents
[src]

type Ratios = R

type Exponents = E

impl<RATIOS: Eq, EXPONENTS: Eq> Eq for SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
[src]

impl<RATIOS: PartialEq, EXPONENTS: PartialEq> PartialEq<SIUnitsT<RATIOS, EXPONENTS>> for SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
[src]

impl<RATIOS: Copy, EXPONENTS: Copy> Copy for SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
[src]

impl<RATIOS: Clone, EXPONENTS: Clone> Clone for SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<RATIOS: Default, EXPONENTS: Default> Default for SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
[src]

impl<RATIOS: Debug, EXPONENTS: Debug> Debug for SIUnitsT<RATIOS, EXPONENTS> where
    RATIOS: SIRatios,
    EXPONENTS: SIExponents
[src]

impl<R, E> Display for SIUnitsT<R, E> where
    R: SIRatios,
    E: SIExponents
[src]

impl<R, E> Sub<SIUnitsT<R, E>> for SIUnitsT<R, E> where
    R: SIRatios,
    E: SIExponents
[src]

type Output = Self

The resulting type after applying the - operator.

impl<R, E> Add<SIUnitsT<R, E>> for SIUnitsT<R, E> where
    R: SIRatios,
    E: SIExponents
[src]

type Output = Self

The resulting type after applying the + operator.

impl<R0, E0, R1, E1> Mul<SIUnitsT<R1, E1>> for SIUnitsT<R0, E0> where
    R0: SIRatios + Xor<R1>,
    E0: SIExponents + Add<E1>,
    R1: SIRatios,
    E1: SIExponents,
    XorOutput<R0, R1>: SIRatios + ReduceWith<AddOutput<E0, E1>> + Default,
    AddOutput<E0, E1>: SIExponents + Default,
    ReduceWithOutput<XorOutput<R0, R1>, AddOutput<E0, E1>>: SIRatios + Default,
    ReduceOutput<SIUnitsT<XorOutput<R0, R1>, AddOutput<E0, E1>>>: Default
[src]

Multiplying a pair of SIUnits is complicated Ratios: must be XOR-able meters * meters is fine. meters * kilometers is not. The output type is ambiguous. Exponents: can be anything. will be added together meters * meters = meters squared However exponents which become zero must zero out their corresponding ratio 10 kilometers per hour * 2 hours = 20 kilometers. The time Ratio was hours, but needs to be zero'd out.

type Output = ReduceOutput<SIUnitsT<XorOutput<R0, R1>, AddOutput<E0, E1>>>

The resulting type after applying the * operator.

impl<R0, E0, R1, E1> Div<SIUnitsT<R1, E1>> for SIUnitsT<R0, E0> where
    R0: SIRatios + Xor<R1>,
    E0: SIExponents + Sub<E1>,
    R1: SIRatios,
    E1: SIExponents,
    XorOutput<R0, R1>: SIRatios + ReduceWith<SubOutput<E0, E1>> + Default,
    SubOutput<E0, E1>: SIExponents + Default,
    ReduceWithOutput<XorOutput<R0, R1>, SubOutput<E0, E1>>: SIRatios + Default,
    ReduceOutput<SIUnitsT<XorOutput<R0, R1>, SubOutput<E0, E1>>>: Default
[src]

See coments on std::ops::Mul<SIUnitsT<_,_>>

type Output = ReduceOutput<SIUnitsT<XorOutput<R0, R1>, SubOutput<E0, E1>>>

The resulting type after applying the / operator.

Auto Trait Implementations

impl<RATIOS, EXPONENTS> Send for SIUnitsT<RATIOS, EXPONENTS> where
    EXPONENTS: Send,
    RATIOS: Send

impl<RATIOS, EXPONENTS> Sync for SIUnitsT<RATIOS, EXPONENTS> where
    EXPONENTS: Sync,
    RATIOS: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self