[][src]Struct ucum::quantity::Quantity

pub struct Quantity<T> { /* fields omitted */ }

Implementations

impl<T> Quantity<T>[src]

pub fn new(magnitude: T, dimension: Dimension) -> Self[src]

pub fn magnitude(&self) -> T where
    T: Clone
[src]

pub fn borrow_magnitude(&self) -> &T[src]

pub fn dimension(&self) -> Dimension[src]

pub fn cast<U>(self) -> Quantity<U> where
    U: From<T>, 
[src]

pub fn raise(&mut self, power: i8) where
    T: Clone + Div<T, Output = T> + From<i32> + MulAssign
[src]

pub fn raised(&self, power: i8) -> Quantity<T> where
    T: Clone + Div<T, Output = T> + From<i32> + MulAssign
[src]

pub fn invert(&mut self) where
    T: Clone + Div<T, Output = T> + From<i32> + MulAssign
[src]

pub fn inverted(&self) -> Quantity<T> where
    T: Clone + Div<T, Output = T> + From<i32> + MulAssign
[src]

pub fn abs(&self) -> Quantity<T> where
    T: Clone + From<i32> + MulAssign + PartialOrd
[src]

Trait Implementations

impl<T: Clone> Clone for Quantity<T>[src]

impl<T: Copy> Copy for Quantity<T>[src]

impl<T: Debug> Debug for Quantity<T>[src]

impl<T: Default> Default for Quantity<T>[src]

impl<T> Display for Quantity<T> where
    T: Display
[src]

impl<T: Display> Div<Dimension> for Quantity<T>[src]

Panic

Both self and rhs must have a standard dimension, otherwise this operation will panic.

type Output = Quantity<T>

The resulting type after applying the / operator.

impl<T> Div<Quantity<T>> for Quantity<T> where
    T: Div<T, Output = T>, 
[src]

Panic

Both self and rhs must have a standard dimension, otherwise this operation will panic.

type Output = Quantity<T>

The resulting type after applying the / operator.

impl<T> Div<f64> for Quantity<T> where
    T: Clone + From<f64> + Div<T, Output = T>, 
[src]

type Output = Quantity<T>

The resulting type after applying the / operator.

impl<T> Div<i32> for Quantity<T> where
    T: Clone + From<i32> + Div<T, Output = T>, 
[src]

type Output = Quantity<T>

The resulting type after applying the / operator.

impl<T, U> DivAssign<U> for Quantity<T> where
    T: DivAssign<T> + From<U>, 
[src]

impl<T: Eq> Eq for Quantity<T>[src]

impl<T: Hash> Hash for Quantity<T>[src]

impl<T> Mul<Dimension> for Quantity<T>[src]

Panic

Both self and rhs must have a standard dimension, otherwise this operation will panic.

type Output = Quantity<T>

The resulting type after applying the * operator.

impl<T> Mul<Quantity<T>> for f64 where
    T: Clone + From<f64> + Mul<T, Output = T>, 
[src]

type Output = Quantity<T>

The resulting type after applying the * operator.

impl<T> Mul<Quantity<T>> for i32 where
    T: Clone + From<i32> + Mul<T, Output = T>, 
[src]

type Output = Quantity<T>

The resulting type after applying the * operator.

impl<T> Mul<Quantity<T>> for Quantity<T> where
    T: Mul<T, Output = T>, 
[src]

Panic

Both self and rhs must have a standard dimension, otherwise this operation will panic.

type Output = Quantity<T>

The resulting type after applying the * operator.

impl<T, U> MulAssign<U> for Quantity<T> where
    T: MulAssign<T> + From<U>, 
[src]

impl<T: PartialEq> PartialEq<Quantity<T>> for Quantity<T>[src]

impl<T> PartialOrd<Quantity<T>> for Quantity<T> where
    T: PartialOrd
[src]

impl<T> StructuralEq for Quantity<T>[src]

impl<T> StructuralPartialEq for Quantity<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Quantity<T> where
    T: RefUnwindSafe

impl<T> Send for Quantity<T> where
    T: Send

impl<T> Sync for Quantity<T> where
    T: Sync

impl<T> Unpin for Quantity<T> where
    T: Unpin

impl<T> UnwindSafe for Quantity<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.