Struct uom::si::Quantity [] [src]

pub struct Quantity<D: ?Sized, U: ?Sized, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V>, 
{ pub dimension: PhantomData<D>, pub units: PhantomData<U>, pub value: V, }

Property of a phenomenon, body or substance, where the property has a magnitude that can be expressed as a number and a reference.

The preferred method of creating a Quantity instance is to use the new constructor which is generic over the input unit and accepts the input value as it's only parameter.

// Create a length of 1 meter.
let L = Length::new::<meter>(1.0);

Quantity fields are public to allow for the creation of const values and instances of non-named Quantitys. This functionality will be deprecated and subsequently removed once the const fn feature is stabilized.

// Create a `const` length of 1 meter.
const L: Length = Length { dimension: PhantomData, units: PhantomData, value: 1.0, };
// Create a `const` area of 1 square meter explicitly without using the `Area` alias.
const A: Quantity<ISQ<P2, Z0, Z0, Z0, Z0, Z0, Z0>, SI<f32>, f32> =
    Quantity { dimension: PhantomData, units: PhantomData, value: 1.0, };

Using units for the wrong quantity will cause a compile error:

This example is not tested
// error[E0277]: the trait bound `second: length::Unit` is not satisfied
let l = Length::new::<second>(1.0);

Mixing quantities will also cause a compile error:

This example is not tested
// error[E0308]: mismatched types
let r = Length::new::<meter>(1.0) + Time::new::<second>(1.0);
This example is not tested
// error[E0308]: mismatched types
let v: Velocity = Length::new::<meter>(1.0) * Time::new::<second>(1.0);

Fields

Quantity dimension. See Dimension.

Quantity base units. See Units.

Quantity value stored in the base units for the quantity.

Methods

impl<D: ?Sized, U: ?Sized, V> Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

[src]

Returns true if this value is NAN and false otherwise.

[src]

Returns true if this value is positive infinity or negative infinity and false otherwise.

[src]

Returns true if this number is neither infinite nor NAN.

[src]

Returns true if the number is neither zero, infinite, subnormal, or NAN.

[src]

Returns the floating point category of the number. If only one property is going to be tested, it is generally faster to use the specific predicate instead.

[src]

Takes the cubic root of a number.

let l: Length = Volume::new::<cubic_meter>(8.0).cbrt();

The input type must have dimensions divisible by three:

This example is not tested
// error[E0271]: type mismatch resolving ...
let r = Area::new::<square_meter>(8.0).cbrt();

[src]

Computes the absolute value of self. Returns NAN if the quantity is NAN.

[src]

Returns a quantity that represents the sign of self.

  • 1.0 of the base unit if the number is positive, +0.0, or INFINITY.
  • -1.0 of the base unit if the number is negative, -0.0, or NEG_INFINITY.
  • NAN if the number is NAN.

[src]

Returns true if self's sign bit is positive, including +0.0 and INFINITY.

[src]

Returns true if self's sign is negative, including -0.0 and NEG_INFINITY.

[src]

Fused multiply-add. Computes (self * a) + b with only one rounding error. This produces a more accurate result with better performance than a separate multiplication operation followed by an add.

[src]

Takes the reciprocal (inverse) of a number, 1/x.

let f: Frequency = Time::new::<second>(1.0).recip();

[src]

Raises a quantity to an integer power.

let a: Area = Length::new::<meter>(3.0).powi(::uom::typenum::P2::new());

[src]

Takes the square root of a number. Returns NAN if self is a negative number.

let l: Length = Area::new::<square_meter>(4.0).sqrt();

The input type must have dimensions divisible by two:

This example is not tested
// error[E0271]: type mismatch resolving ...
let r = Length::new::<meter>(4.0).sqrt();

[src]

Returns the maximum of the two quantities.

[src]

Returns the minimum of the two quantities.

Trait Implementations

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, usize>> for usize where
    D: Dimension,
    U: Units<usize>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, u8>> for u8 where
    D: Dimension,
    U: Units<u8>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, u16>> for u16 where
    D: Dimension,
    U: Units<u16>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, u32>> for u32 where
    D: Dimension,
    U: Units<u32>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, u64>> for u64 where
    D: Dimension,
    U: Units<u64>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, isize>> for isize where
    D: Dimension,
    U: Units<isize>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, i8>> for i8 where
    D: Dimension,
    U: Units<i8>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, i16>> for i16 where
    D: Dimension,
    U: Units<i16>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, i32>> for i32 where
    D: Dimension,
    U: Units<i32>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, i64>> for i64 where
    D: Dimension,
    U: Units<i64>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, BigInt>> for BigInt where
    D: Dimension,
    U: Units<BigInt>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, BigUint>> for BigUint where
    D: Dimension,
    U: Units<BigUint>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, Rational>> for Rational where
    D: Dimension,
    U: Units<Rational>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, Rational32>> for Rational32 where
    D: Dimension,
    U: Units<Rational32>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, Rational64>> for Rational64 where
    D: Dimension,
    U: Units<Rational64>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, BigRational>> for BigRational where
    D: Dimension,
    U: Units<BigRational>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, f32>> for f32 where
    D: Dimension,
    U: Units<f32>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, f64>> for f64 where
    D: Dimension,
    U: Units<f64>,
    Z0: Add<D::L>,
    Z0: Add<D::M>,
    Z0: Add<D::T>,
    Z0: Add<D::I>,
    Z0: Add<D::Th>,
    Z0: Add<D::N>,
    Z0: Add<D::J>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, usize>> for usize where
    D: Dimension,
    U: Units<usize>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, u8>> for u8 where
    D: Dimension,
    U: Units<u8>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, u16>> for u16 where
    D: Dimension,
    U: Units<u16>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, u32>> for u32 where
    D: Dimension,
    U: Units<u32>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, u64>> for u64 where
    D: Dimension,
    U: Units<u64>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, isize>> for isize where
    D: Dimension,
    U: Units<isize>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, i8>> for i8 where
    D: Dimension,
    U: Units<i8>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, i16>> for i16 where
    D: Dimension,
    U: Units<i16>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, i32>> for i32 where
    D: Dimension,
    U: Units<i32>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, i64>> for i64 where
    D: Dimension,
    U: Units<i64>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, BigInt>> for BigInt where
    D: Dimension,
    U: Units<BigInt>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, BigUint>> for BigUint where
    D: Dimension,
    U: Units<BigUint>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, Rational>> for Rational where
    D: Dimension,
    U: Units<Rational>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, Rational32>> for Rational32 where
    D: Dimension,
    U: Units<Rational32>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, Rational64>> for Rational64 where
    D: Dimension,
    U: Units<Rational64>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, BigRational>> for BigRational where
    D: Dimension,
    U: Units<BigRational>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, f32>> for f32 where
    D: Dimension,
    U: Units<f32>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, f64>> for f64 where
    D: Dimension,
    U: Units<f64>,
    Z0: Sub<D::L>,
    Z0: Sub<D::M>,
    Z0: Sub<D::T>,
    Z0: Sub<D::I>,
    Z0: Sub<D::Th>,
    Z0: Sub<D::N>,
    Z0: Sub<D::J>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Add<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> AddAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V> + AddAssign<V>, 
[src]

[src]

Performs the += operation.

impl<Dl: ?Sized, Dr: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Mul<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V> where
    Dl: Dimension,
    Dl::L: Add<Dr::L>,
    Dl::M: Add<Dr::M>,
    Dl::T: Add<Dr::T>,
    Dl::I: Add<Dr::I>,
    Dl::Th: Add<Dr::Th>,
    Dl::N: Add<Dr::N>,
    Dl::J: Add<Dr::J>,
    Dr: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V> + Mul<V>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized, V> Mul<V> for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<D: ?Sized, U: ?Sized, V> MulAssign<V> for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + MulAssign<V>, 
[src]

[src]

Performs the *= operation.

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Sub<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> SubAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V> + SubAssign<V>, 
[src]

[src]

Performs the -= operation.

impl<Dl: ?Sized, Dr: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Div<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V> where
    Dl: Dimension,
    Dl::L: Sub<Dr::L>,
    Dl::M: Sub<Dr::M>,
    Dl::T: Sub<Dr::T>,
    Dl::I: Sub<Dr::I>,
    Dl::Th: Sub<Dr::Th>,
    Dl::N: Sub<Dr::N>,
    Dl::J: Sub<Dr::J>,
    Dr: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V> + Div<V>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized, V> Div<V> for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<D: ?Sized, U: ?Sized, V> DivAssign<V> for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + DivAssign<V>, 
[src]

[src]

Performs the /= operation.

impl<D: ?Sized, U: ?Sized, V> Clone for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<D: ?Sized, U: ?Sized, V> Copy for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Copy
[src]

impl<D: ?Sized, U: ?Sized, V> Debug for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<D: ?Sized, U: ?Sized, V> Default for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Default
[src]

[src]

Returns the "default value" for a type. Read more

impl<D: ?Sized, U: ?Sized, V> Eq for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Eq
[src]

impl<D: ?Sized, U: ?Sized, V> Hash for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Hash
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<D: ?Sized, U: ?Sized, V> Neg for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Signed + Conversion<V>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<D: ?Sized, U: ?Sized, V> Ord for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Ord
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> PartialEq<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V>, 
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> PartialOrd<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V> + PartialOrd
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Rem<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V>, 
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> RemAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
    D: Dimension,
    Ul: Units<V>,
    Ur: Units<V>,
    V: Num + Conversion<V> + RemAssign
[src]

[src]

Performs the %= operation.

impl<D: ?Sized, U: ?Sized, V> Saturating for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Saturating
[src]

[src]

Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing. Read more

[src]

Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing. Read more

impl<D: ?Sized, U: ?Sized, V> Sum for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Sum
[src]

[src]

Method which takes an iterator and generates Self from the elements by "summing up" the items. Read more

impl<D: ?Sized, U: ?Sized, V> Zero for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

[src]

Returns the additive identity element of Self, 0. Read more

[src]

Returns true if self is equal to the additive identity.

impl<D: ?Sized, U: ?Sized, V> Serialize for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Serialize
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, D: ?Sized, U: ?Sized, V> Deserialize<'de> for Quantity<D, U, V> where
    D: Dimension,
    U: Units<V>,
    V: Num + Conversion<V> + Deserialize<'de>, 
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl<D: ?Sized, U: ?Sized, V> Send for Quantity<D, U, V> where
    V: Send

impl<D: ?Sized, U: ?Sized, V> Sync for Quantity<D, U, V> where
    V: Sync