[][src]Struct heim_common::units::si::Quantity

pub struct Quantity<D, U, V> where
    D: Dimension + ?Sized,
    U: Units<V> + ?Sized,
    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.

This example is not tested
// 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.

This example is not tested
// 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

dimension: PhantomData<D>

Quantity dimension. See Dimension.

units: PhantomData<U>

Quantity base units. See Units.

value: V

Quantity value stored in the base units for the quantity.

Methods

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Float + Conversion<V>, 
[src]

pub fn hypot(
    self,
    other: Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V>
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V>
[src]

Calculates the length of the hypotenuse of a right-angle triangle given the legs.

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

impl<U, V> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

pub fn new<N>(
    v: V
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Create a new quantity from the given value and measurement unit.

pub fn get<N>(&self) -> V where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>, 
[src]

Retrieve the value of the quantity in the given measurement unit.

pub fn floor<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the largest integer less than or equal to a number in the given measurement unit.

pub fn ceil<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the smallest integer less than or equal to a number in the given measurement unit.

pub fn round<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

pub fn trunc<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the integer part of a number in the given measurement unit.

pub fn fract<N>(
    self
) -> Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
    N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,
    V: Float
[src]

Returns the fractional part of a number in the given measurement unit.

pub fn format_args<N>(
    unit: N,
    style: DisplayStyle
) -> Arguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, N> where
    N: Unit
[src]

Creates a struct that can be used to format a compatible quantity for display.

Notes

The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.

If you do not need to format multiple quantities, consider using into_format_args instead.

Examples

This example is not tested
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1)));
assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));

pub fn into_format_args<N>(
    self,
    unit: N,
    style: DisplayStyle
) -> QuantityArguments<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V, N> where
    N: Unit
[src]

Creates a struct that formats self for display.

Notes

Unlike format_args, the return value of this method can be used directly for display. It will format the value of self for the quantity on which it is called and nothing else.

If you wish to reuse the return value to format multiple quantities, use format_args instead.

Examples

This example is not tested
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));

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

pub fn is_nan(self) -> bool where
    V: Float
[src]

Returns true if this value is NAN and false otherwise.

pub fn is_infinite(self) -> bool where
    V: Float
[src]

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

pub fn is_finite(self) -> bool where
    V: Float
[src]

Returns true if this number is neither infinite nor NAN.

pub fn is_normal(self) -> bool where
    V: Float
[src]

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

pub fn classify(self) -> FpCategory where
    V: Float
[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.

pub fn cbrt(
    self
) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, Kind = dyn Kind + 'static, T = <<D as Dimension>::T as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, I = <<D as Dimension>::I as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, M = <<D as Dimension>::M as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, J = <<D as Dimension>::J as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, L = <<D as Dimension>::L as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, N = <<D as Dimension>::N as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output> + 'static, U, V> where
    V: Float,
    <D as Dimension>::L: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::M: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::T: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::I: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::Th: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::N: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::J: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>,
    <D as Dimension>::Kind: Div
[src]

Takes the cubic root of a number.

This example is not tested
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();

pub fn abs(self) -> Quantity<D, U, V> where
    V: Signed
[src]

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

pub fn signum(self) -> Quantity<D, U, V> where
    V: Signed
[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.

pub fn is_sign_positive(self) -> bool where
    V: Float
[src]

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

pub fn is_sign_negative(self) -> bool where
    V: Float
[src]

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

pub fn mul_add<Da, Ua, Ub>(
    self,
    a: Quantity<Da, Ua, V>,
    b: Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Add<<Da as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, T = <<D as Dimension>::T as Add<<Da as Dimension>::T>>::Output, I = <<D as Dimension>::I as Add<<Da as Dimension>::I>>::Output, M = <<D as Dimension>::M as Add<<Da as Dimension>::M>>::Output, J = <<D as Dimension>::J as Add<<Da as Dimension>::J>>::Output, L = <<D as Dimension>::L as Add<<Da as Dimension>::L>>::Output, N = <<D as Dimension>::N as Add<<Da as Dimension>::N>>::Output> + 'static, Ub, V>
) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Add<<Da as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, T = <<D as Dimension>::T as Add<<Da as Dimension>::T>>::Output, I = <<D as Dimension>::I as Add<<Da as Dimension>::I>>::Output, M = <<D as Dimension>::M as Add<<Da as Dimension>::M>>::Output, J = <<D as Dimension>::J as Add<<Da as Dimension>::J>>::Output, L = <<D as Dimension>::L as Add<<Da as Dimension>::L>>::Output, N = <<D as Dimension>::N as Add<<Da as Dimension>::N>>::Output> + 'static, U, V> where
    Da: Dimension + ?Sized,
    Ua: Units<V> + ?Sized,
    Ub: Units<V> + ?Sized,
    V: Float,
    <D as Dimension>::L: Add<<Da as Dimension>::L>,
    <D as Dimension>::M: Add<<Da as Dimension>::M>,
    <D as Dimension>::T: Add<<Da as Dimension>::T>,
    <D as Dimension>::I: Add<<Da as Dimension>::I>,
    <D as Dimension>::Th: Add<<Da as Dimension>::Th>,
    <D as Dimension>::N: Add<<Da as Dimension>::N>,
    <D as Dimension>::J: Add<<Da as Dimension>::J>,
    <D as Dimension>::Kind: Mul,
    <Da as Dimension>::Kind: Mul
[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.

pub fn recip(
    self
) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Neg>::Output, Kind = dyn Kind + 'static, T = <<D as Dimension>::T as Neg>::Output, I = <<D as Dimension>::I as Neg>::Output, M = <<D as Dimension>::M as Neg>::Output, J = <<D as Dimension>::J as Neg>::Output, L = <<D as Dimension>::L as Neg>::Output, N = <<D as Dimension>::N as Neg>::Output> + 'static, U, V> where
    V: Float,
    <D as Dimension>::L: Neg,
    <D as Dimension>::M: Neg,
    <D as Dimension>::T: Neg,
    <D as Dimension>::I: Neg,
    <D as Dimension>::Th: Neg,
    <D as Dimension>::N: Neg,
    <D as Dimension>::J: Neg,
    <D as Dimension>::Kind: Div
[src]

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

This example is not tested
let f: Frequency = Time::new::<second>(1.0).recip();

pub fn powi<E>(
    self,
    e: E
) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Mul<E>>::Output, Kind = dyn Kind + 'static, T = <<D as Dimension>::T as Mul<E>>::Output, I = <<D as Dimension>::I as Mul<E>>::Output, M = <<D as Dimension>::M as Mul<E>>::Output, J = <<D as Dimension>::J as Mul<E>>::Output, L = <<D as Dimension>::L as Mul<E>>::Output, N = <<D as Dimension>::N as Mul<E>>::Output> + 'static, U, V> where
    E: Integer,
    V: Pow<E, Output = V> + Conversion<V>,
    <D as Dimension>::L: Mul<E>,
    <D as Dimension>::M: Mul<E>,
    <D as Dimension>::T: Mul<E>,
    <D as Dimension>::I: Mul<E>,
    <D as Dimension>::Th: Mul<E>,
    <D as Dimension>::N: Mul<E>,
    <D as Dimension>::J: Mul<E>,
    <D as Dimension>::Kind: Mul
[src]

Raises a quantity to an integer power.

This example is not tested
let a: Area = Length::new::<meter>(3.0).powi(::uom::typenum::P2::new());

pub fn sqrt(
    self
) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, Kind = dyn Kind + 'static, T = <<D as Dimension>::T as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, I = <<D as Dimension>::I as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, M = <<D as Dimension>::M as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, J = <<D as Dimension>::J as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, L = <<D as Dimension>::L as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, N = <<D as Dimension>::N as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output> + 'static, U, V> where
    V: Float,
    <D as Dimension>::L: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::M: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::T: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::I: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::Th: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::N: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::J: PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>,
    <D as Dimension>::Kind: Div
[src]

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

This example is not tested
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();

pub fn max(self, other: Quantity<D, U, V>) -> Quantity<D, U, V> where
    V: Float
[src]

Returns the maximum of the two quantities.

pub fn min(self, other: Quantity<D, U, V>) -> Quantity<D, U, V> where
    V: Float
[src]

Returns the minimum of the two quantities.

Trait Implementations

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

impl<Ul, Ur, V> AddAssign<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ur, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V> where
    Ul: Units<V> + ?Sized,
    Ur: Units<V> + ?Sized,
    V: Num + Conversion<V> + AddAssign<V>, 
[src]

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

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

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

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

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

Performs copy-assignment from source. Read more

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

#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

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

type Output = Quantity<D, U, V>

The resulting type after applying the - operator.

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

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

type Output = Quantity<D, U, V>

The resulting type after applying the * operator.

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

type Output = Quantity<dyn Dimension<Th = <<Dl as Dimension>::Th as Add<<Dr as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, T = <<Dl as Dimension>::T as Add<<Dr as Dimension>::T>>::Output, I = <<Dl as Dimension>::I as Add<<Dr as Dimension>::I>>::Output, M = <<Dl as Dimension>::M as Add<<Dr as Dimension>::M>>::Output, J = <<Dl as Dimension>::J as Add<<Dr as Dimension>::J>>::Output, L = <<Dl as Dimension>::L as Add<<Dr as Dimension>::L>>::Output, N = <<Dl as Dimension>::N as Add<<Dr as Dimension>::N>>::Output> + 'static, Ul, V>

The resulting type after applying the * operator.

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

type Output = Quantity<D, Ul, V>

The resulting type after applying the % operator.

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

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

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

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

impl<Ul, Ur, V> Add<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ur, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V> where
    Ul: Units<V> + ?Sized,
    Ur: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

type Output = Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V>

The resulting type after applying the + operator.

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

type Output = Quantity<D, Ul, V>

The resulting type after applying the + operator.

impl<Ul, Ur, V> Add<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ur, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V> where
    Ul: Units<V> + ?Sized,
    Ur: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

type Output = Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V>

The resulting type after applying the + operator.

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

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

impl<Ul, Ur, V> SubAssign<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ur, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V> where
    Ul: Units<V> + ?Sized,
    Ur: Units<V> + ?Sized,
    V: Num + Conversion<V> + SubAssign<V>, 
[src]

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

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

type Output = Quantity<D, U, V>

The resulting type after applying the / operator.

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

type Output = Quantity<dyn Dimension<Th = <<Dl as Dimension>::Th as Sub<<Dr as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, T = <<Dl as Dimension>::T as Sub<<Dr as Dimension>::T>>::Output, I = <<Dl as Dimension>::I as Sub<<Dr as Dimension>::I>>::Output, M = <<Dl as Dimension>::M as Sub<<Dr as Dimension>::M>>::Output, J = <<Dl as Dimension>::J as Sub<<Dr as Dimension>::J>>::Output, L = <<Dl as Dimension>::L as Sub<<Dr as Dimension>::L>>::Output, N = <<Dl as Dimension>::N as Sub<<Dr as Dimension>::N>>::Output> + 'static, Ul, V>

The resulting type after applying the / operator.

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

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

default fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UInt<UTerm, B1>, B1>>, I = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = PInt<UInt<UTerm, B1>>, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>, L = Z0, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B1>>, I = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = Z0, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, usize> where
    U: Units<usize> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, f64> where
    U: Units<f64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UInt<UTerm, B1>, B0>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = NInt<UInt<UTerm, B1>>, I = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0, L = Z0, N = Z0> + 'static, U, u64> where
    U: Units<u64> + ?Sized
[src]

type Err = ParseQuantityError

The associated error which can be returned from parsing.

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

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

type Output = Quantity<D, Ul, V>

The resulting type after applying the - operator.

impl<Ul, Ur, V> Sub<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ur, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V> where
    Ul: Units<V> + ?Sized,
    Ur: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

type Output = Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, Kind = dyn Temperature + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, Ul, V>

The resulting type after applying the - operator.

impl<U, V> From<V> for Quantity<dyn Dimension<Th = Z0, Kind = dyn Kind + 'static, T = Z0, I = Z0, M = Z0, J = Z0, L = Z0, N = Z0> + 'static, U, V> where
    U: Units<V> + ?Sized,
    V: Num + Conversion<V>, 
[src]

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

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

Blanket Implementations

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

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> Same for T

type Output = T

Should always be Self

impl<T, Rhs, Output> NumOps for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T, Rhs> NumAssignOps for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<'a, T> TryFrom for T where
    T: FromStr
[src]

type Err = <T as FromStr>::Err

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

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