Struct blackbox_log::units::si::Quantity

#[repr(transparent)]
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, }
Expand description

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

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

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

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

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

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

// 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:

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

§Generic Parameters

  • D: Quantity dimension. See Dimension.
  • U: Quantity base units. See Units.
  • V: Quantity value underlying storage type.

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.

Implementations§

§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, dyn Units<f64, mass = kilogram, time = second, electric_current = ampere, length = meter, amount_of_substance = mole, thermodynamic_temperature = kelvin, luminous_intensity = candela>, f64>

pub const HALF_TURN: Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, dyn Units<f64, mass = kilogram, time = second, electric_current = ampere, length = meter, amount_of_substance = mole, thermodynamic_temperature = kelvin, luminous_intensity = candela>, f64> = _

A half turn, i.e. an angle with a value of π as measured in radians

pub const FULL_TURN: Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, dyn Units<f64, mass = kilogram, time = second, electric_current = ampere, length = meter, amount_of_substance = mole, thermodynamic_temperature = kelvin, luminous_intensity = candela>, f64> = _

A full turn, i.e. an angle with a value of 2π as measured in radians

§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Float + Conversion<V>,

Implementation of various stdlib trigonometric functions

pub fn cos( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the cosine of the angle.

pub fn cosh( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the hyperbolic cosine of the angle.

pub fn sin( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the sine of the angle.

pub fn sinh( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the hyperbolic sine of the angle.

pub fn sin_cos( self ) -> (Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>, Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>)

Computes the value of both the sine and cosine of the angle.

pub fn tan( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the tangent of the angle.

pub fn tanh( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the hyperbolic tangent of the angle.

§

impl<D, U, V> Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Float + Conversion<V>, radian: Conversion<V, T = <V as Conversion<V>>::T>,

pub fn atan2( self, other: Quantity<D, U, V> ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the four quadrant arctangent of self (y) and other (x).

§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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
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)));
§Generic Parameters
  • N: Unit.

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

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

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

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

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

§Generic Parameters
  • N: Unit.

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

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float + Conversion<V>, radian: Conversion<V, T = <V as Conversion<V>>::T>, ratio: Conversion<V, T = <V as Conversion<V>>::T>, U: Units<V> + ?Sized,

Implementation of various stdlib functions.

pub fn acos( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the inverse cosine of the ratio.

pub fn acosh( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the inverse hyperbolic cosine of the ratio.

pub fn asin( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the inverse sine of the ratio.

pub fn asinh( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the inverse hyperbolic sine of the ratio.

pub fn atan( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the inverse tangent of the ratio.

pub fn atanh( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Computes the value of the inverse hyperbolic tangent of the ratio.

pub fn exp( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns e^(self), (the exponential function).

pub fn exp2( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns 2^(self).

pub fn ln( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns the natural logarithm of the number.

pub fn log( self, base: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns the logarithm of the number with respect to an arbitrary base.

The result might not be correctly rounded owing to implementation details; self.log2() can produce more accurate results for base 2, and self.log10() can produce more accurate results for base 10.

pub fn log2( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns the base 2 logarithm of the number.

pub fn log10( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns the base 10 logarithm of the number.

pub fn exp_m1( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns e^(self) - 1 in a way that is accurate even if the number is close to zero.

pub fn ln_1p( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Returns ln(1+n) (natural logarithm) more accurately than if the operations were performed separately.

§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, dyn Units<f64, mass = kilogram, time = second, electric_current = ampere, length = meter, amount_of_substance = mole, thermodynamic_temperature = kelvin, luminous_intensity = candela>, f64>

pub const SPHERE: Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, dyn Units<f64, mass = kilogram, time = second, electric_current = ampere, length = meter, amount_of_substance = mole, thermodynamic_temperature = kelvin, luminous_intensity = candela>, f64> = _

The solid angle subtended by a sphere at its center, i.e. with a value 4π as measured in steradians.

§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<U, V> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn new<N>( v: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Create a new quantity from the given value and measurement unit.

§Generic Parameters
  • N: Unit.

pub fn get<N>(&self) -> V
where N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Retrieve the value of the quantity in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn floor<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the largest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn ceil<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the smallest integer less than or equal to a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn round<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the nearest integer to a number in the in given measurement unit. Round half-way cases away from 0.0.

§Generic Parameters
  • N: Unit.

pub fn trunc<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the integer part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn fract<N>( self ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V>
where V: Float, N: Unit + Conversion<V, T = <V as Conversion<V>>::T>,

Returns the fractional part of a number in the given measurement unit.

§Generic Parameters
  • N: Unit.

pub fn format_args<N>( _unit: N, style: DisplayStyle ) -> Arguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, N>
where N: Unit,

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
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)));
§Generic Parameters
  • N: Unit.

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle ) -> QuantityArguments<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, V, N>
where N: Unit,

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
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

assert_eq!("100 femtoseconds", format!("{}", a));
§Generic Parameters
  • N: Unit.
§

impl<D, U, V> Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V>,

pub fn classify(self) -> FpCategory
where V: Float,

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 hypot(self, other: Quantity<D, U, V>) -> Quantity<D, U, V>
where V: Float,

Calculates the length of the hypotenuse of a right-angle triangle given the legs.

pub fn abs(self) -> Quantity<D, U, V>
where V: Signed,

Computes the absolute value of self. Returns NAN if the quantity is NAN.

pub fn signum(self) -> Quantity<D, U, V>
where V: Signed,

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,

Returns true if self’s sign bit is positive, including +0.0 and INFINITY.

pub fn is_sign_negative(self) -> bool
where V: Float,

Returns true if self’s sign is negative, including -0.0 and NEG_INFINITY.

pub fn recip( self ) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Neg>::Output, N = <<D as Dimension>::N as Neg>::Output, Kind = dyn Kind, I = <<D as Dimension>::I as Neg>::Output, T = <<D as Dimension>::T as Neg>::Output, L = <<D as Dimension>::L as Neg>::Output, M = <<D as Dimension>::M as Neg>::Output, J = <<D as Dimension>::J as Neg>::Output>, U, V>
where <D as Dimension>::L: Neg, <<D as Dimension>::L as Neg>::Output: Integer, <D as Dimension>::M: Neg, <<D as Dimension>::M as Neg>::Output: Integer, <D as Dimension>::T: Neg, <<D as Dimension>::T as Neg>::Output: Integer, <D as Dimension>::I: Neg, <<D as Dimension>::I as Neg>::Output: Integer, <D as Dimension>::Th: Neg, <<D as Dimension>::Th as Neg>::Output: Integer, <D as Dimension>::N: Neg, <<D as Dimension>::N as Neg>::Output: Integer, <D as Dimension>::J: Neg, <<D as Dimension>::J as Neg>::Output: Integer, <D as Dimension>::Kind: Div, V: Float,

Takes the reciprocal (inverse) of a number, 1/x.

let f: Frequency = Time::new::<second>(1.0).recip();

pub fn max(self, other: Quantity<D, U, V>) -> Quantity<D, U, V>
where V: Float,

Returns the maximum of the two quantities.

pub fn min(self, other: Quantity<D, U, V>) -> Quantity<D, U, V>
where V: Float,

Returns the minimum of the two quantities.

§

impl<D, U> Quantity<D, U, f64>
where D: Dimension + ?Sized, U: Units<f64> + ?Sized,

pub fn is_nan(self) -> bool

Returns true if this value is NAN and false otherwise.

pub fn is_infinite(self) -> bool

Returns true if this value is positive infinity or negative infinity and false otherwise.

pub fn is_finite(self) -> bool

Returns true if this number is neither infinite nor NAN.

pub fn is_normal(self) -> bool

Returns true if the number is neither zero, infinite, subnormal, or NAN.

pub fn cbrt( self ) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, N = <<D as Dimension>::N as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, Kind = dyn Kind, I = <<D as Dimension>::I as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, T = <<D as Dimension>::T as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B1>>>>::Output, L = <<D as Dimension>::L 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>, U, f64>

Takes the cubic root of a number.

let l: Length = Volume::new::<cubic_meter>(8.0).cbrt();

The input type must have dimensions divisible by three:

// error[E0271]: type mismatch resolving ...
let r = Area::new::<square_meter>(8.0).cbrt();

pub fn mul_add<Da, Ua, Ub>( self, a: Quantity<Da, Ua, f64>, b: Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Add<<Da as Dimension>::Th>>::Output, N = <<D as Dimension>::N as Add<<Da as Dimension>::N>>::Output, Kind = dyn Kind, I = <<D as Dimension>::I as Add<<Da as Dimension>::I>>::Output, T = <<D as Dimension>::T as Add<<Da as Dimension>::T>>::Output, L = <<D as Dimension>::L as Add<<Da as Dimension>::L>>::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>, Ub, f64> ) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Add<<Da as Dimension>::Th>>::Output, N = <<D as Dimension>::N as Add<<Da as Dimension>::N>>::Output, Kind = dyn Kind, I = <<D as Dimension>::I as Add<<Da as Dimension>::I>>::Output, T = <<D as Dimension>::T as Add<<Da as Dimension>::T>>::Output, L = <<D as Dimension>::L as Add<<Da as Dimension>::L>>::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>, U, f64>
where <D as Dimension>::L: Add<<Da as Dimension>::L>, <<D as Dimension>::L as Add<<Da as Dimension>::L>>::Output: Integer, <D as Dimension>::M: Add<<Da as Dimension>::M>, <<D as Dimension>::M as Add<<Da as Dimension>::M>>::Output: Integer, <D as Dimension>::T: Add<<Da as Dimension>::T>, <<D as Dimension>::T as Add<<Da as Dimension>::T>>::Output: Integer, <D as Dimension>::I: Add<<Da as Dimension>::I>, <<D as Dimension>::I as Add<<Da as Dimension>::I>>::Output: Integer, <D as Dimension>::Th: Add<<Da as Dimension>::Th>, <<D as Dimension>::Th as Add<<Da as Dimension>::Th>>::Output: Integer, <D as Dimension>::N: Add<<Da as Dimension>::N>, <<D as Dimension>::N as Add<<Da as Dimension>::N>>::Output: Integer, <D as Dimension>::J: Add<<Da as Dimension>::J>, <<D as Dimension>::J as Add<<Da as Dimension>::J>>::Output: Integer, <D as Dimension>::Kind: Mul, Da: Dimension + ?Sized, <Da as Dimension>::Kind: Mul, Ua: Units<f64> + ?Sized, Ub: Units<f64> + ?Sized,

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.

§Generic Parameters
  • Da: Dimension for parameter a.
  • Ua: Base units for parameter a.
  • Ub: Base units for parameter b.

pub fn powi<E>( self, _e: E ) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as Mul<E>>::Output, N = <<D as Dimension>::N as Mul<E>>::Output, Kind = dyn Kind, I = <<D as Dimension>::I as Mul<E>>::Output, T = <<D as Dimension>::T as Mul<E>>::Output, L = <<D as Dimension>::L as Mul<E>>::Output, M = <<D as Dimension>::M as Mul<E>>::Output, J = <<D as Dimension>::J as Mul<E>>::Output>, U, f64>
where <D as Dimension>::L: Mul<E>, <<D as Dimension>::L as Mul<E>>::Output: Integer, <D as Dimension>::M: Mul<E>, <<D as Dimension>::M as Mul<E>>::Output: Integer, <D as Dimension>::T: Mul<E>, <<D as Dimension>::T as Mul<E>>::Output: Integer, <D as Dimension>::I: Mul<E>, <<D as Dimension>::I as Mul<E>>::Output: Integer, <D as Dimension>::Th: Mul<E>, <<D as Dimension>::Th as Mul<E>>::Output: Integer, <D as Dimension>::N: Mul<E>, <<D as Dimension>::N as Mul<E>>::Output: Integer, <D as Dimension>::J: Mul<E>, <<D as Dimension>::J as Mul<E>>::Output: Integer, <D as Dimension>::Kind: Mul, E: Integer,

Raises a quantity to an integer power.

use uom::typenum::P2;

let a: Area = Length::new::<meter>(3.0).powi(P2::new());
§Generic Parameters
  • E: typenum::Integer power.

pub fn sqrt( self ) -> Quantity<dyn Dimension<Th = <<D as Dimension>::Th as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, N = <<D as Dimension>::N as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, Kind = dyn Kind, I = <<D as Dimension>::I as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, T = <<D as Dimension>::T as PartialDiv<PInt<UInt<UInt<UTerm, B1>, B0>>>>::Output, L = <<D as Dimension>::L 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>, U, f64>

Takes the square root of a number. Returns NAN if self is a negative number.

let l: Length = Area::new::<square_meter>(4.0).sqrt();

The input type must have dimensions divisible by two:

// error[E0271]: type mismatch resolving ...
let r = Length::new::<meter>(4.0).sqrt();

Trait Implementations§

§

impl<U, V> Add<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

The resulting type after applying the + operator.
§

fn add( self, rhs: Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> ) -> <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> as Add<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>>>::Output

Performs the + operation. Read more
§

impl<U, V> Add<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

The resulting type after applying the + operator.
§

fn add( self, rhs: Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> ) -> <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> as Add<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>>>::Output

Performs the + operation. Read more
§

impl<D, U, V> Add for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<D, U, V>

The resulting type after applying the + operator.
§

fn add(self, rhs: Quantity<D, U, V>) -> <Quantity<D, U, V> as Add>::Output

Performs the + operation. Read more
§

impl<U, V> AddAssign<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V> + AddAssign,

§

fn add_assign( &mut self, rhs: Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> )

Performs the += operation. Read more
§

impl<D, U, V> AddAssign for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: AddAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + AddAssign,

§

fn add_assign(&mut self, rhs: Quantity<D, U, V>)

Performs the += operation. Read more
§

impl<D, U, V> Clone for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Clone,

§

fn clone(&self) -> Quantity<D, U, V>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<D, U, V> ConstZero for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + ConstZero,

§

const ZERO: Quantity<D, U, V> = _

Constant representing the zero value.
§

impl<D, U, V> Debug for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<D, U, V> Default for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Default,

§

fn default() -> Quantity<D, U, V>

Returns the “default value” for a type. Read more
§

impl<Dl, Dr, U, V> Div<Quantity<Dr, U, V>> for Quantity<Dl, U, V>
where Dl: Dimension + ?Sized, <Dl as Dimension>::L: Sub<<Dr as Dimension>::L>, <<Dl as Dimension>::L as Sub<<Dr as Dimension>::L>>::Output: Integer, <Dl as Dimension>::M: Sub<<Dr as Dimension>::M>, <<Dl as Dimension>::M as Sub<<Dr as Dimension>::M>>::Output: Integer, <Dl as Dimension>::T: Sub<<Dr as Dimension>::T>, <<Dl as Dimension>::T as Sub<<Dr as Dimension>::T>>::Output: Integer, <Dl as Dimension>::I: Sub<<Dr as Dimension>::I>, <<Dl as Dimension>::I as Sub<<Dr as Dimension>::I>>::Output: Integer, <Dl as Dimension>::Th: Sub<<Dr as Dimension>::Th>, <<Dl as Dimension>::Th as Sub<<Dr as Dimension>::Th>>::Output: Integer, <Dl as Dimension>::N: Sub<<Dr as Dimension>::N>, <<Dl as Dimension>::N as Sub<<Dr as Dimension>::N>>::Output: Integer, <Dl as Dimension>::J: Sub<<Dr as Dimension>::J>, <<Dl as Dimension>::J as Sub<<Dr as Dimension>::J>>::Output: Integer, <Dl as Dimension>::Kind: Div, Dr: Dimension + ?Sized, <Dr as Dimension>::Kind: Div, U: Units<V> + ?Sized, V: Num + Conversion<V> + Div,

§

type Output = Quantity<dyn Dimension<Th = <<Dl as Dimension>::Th as Sub<<Dr as Dimension>::Th>>::Output, N = <<Dl as Dimension>::N as Sub<<Dr as Dimension>::N>>::Output, Kind = dyn Kind, I = <<Dl as Dimension>::I as Sub<<Dr as Dimension>::I>>::Output, T = <<Dl as Dimension>::T as Sub<<Dr as Dimension>::T>>::Output, L = <<Dl as Dimension>::L as Sub<<Dr as Dimension>::L>>::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>, U, V>

The resulting type after applying the / operator.
§

fn div( self, rhs: Quantity<Dr, U, V> ) -> <Quantity<Dl, U, V> as Div<Quantity<Dr, U, V>>>::Output

Performs the / operation. Read more
§

impl<D, U, V> Div<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Div, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<D, U, V>

The resulting type after applying the / operator.
§

fn div(self, rhs: V) -> <Quantity<D, U, V> as Div<V>>::Output

Performs the / operation. Read more
§

impl<D, U, V> DivAssign<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: DivAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + DivAssign,

§

fn div_assign(&mut self, rhs: V)

Performs the /= operation. Read more
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn AngleKind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn AngleKind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn ConstituentConcentrationKind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn ConstituentConcentrationKind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn InformationKind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn InformationKind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn AngleKind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn AngleKind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn ConstituentConcentrationKind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn ConstituentConcentrationKind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn InformationKind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn InformationKind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn SolidAngleKind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn SolidAngleKind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<L, M, T, I, Th, N, J, U, V> From<Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn SolidAngleKind, I = I, T = T, L = L, M = M, J = J>, U, V>> for Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>
where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( val: Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn SolidAngleKind, I = I, T = T, L = L, M = M, J = J>, U, V> ) -> Quantity<dyn Dimension<Th = Th, N = N, Kind = dyn Kind, I = I, T = T, L = L, M = M, J = J>, U, V>

Converts to this type from the input type.
§

impl<U, V> From<V> for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn from( t: V ) -> Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

Converts to this type from the input type.
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = PInt<UInt<UTerm, B1>>, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = PInt<UInt<UTerm, B1>>>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn AngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = Z0, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn ConstituentConcentrationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn InformationKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = NInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = NInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = NInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn SolidAngleKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<U> FromStr for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>
where U: Units<f64> + ?Sized,

§

type Err = ParseQuantityError

The associated error which can be returned from parsing.
§

fn from_str( s: &str ) -> Result<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64>, <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, f64> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl<D, U, V> Hash for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Hash,

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<Dl, Dr, U, V> Mul<Quantity<Dr, U, V>> for Quantity<Dl, U, V>
where Dl: Dimension + ?Sized, <Dl as Dimension>::L: Add<<Dr as Dimension>::L>, <<Dl as Dimension>::L as Add<<Dr as Dimension>::L>>::Output: Integer, <Dl as Dimension>::M: Add<<Dr as Dimension>::M>, <<Dl as Dimension>::M as Add<<Dr as Dimension>::M>>::Output: Integer, <Dl as Dimension>::T: Add<<Dr as Dimension>::T>, <<Dl as Dimension>::T as Add<<Dr as Dimension>::T>>::Output: Integer, <Dl as Dimension>::I: Add<<Dr as Dimension>::I>, <<Dl as Dimension>::I as Add<<Dr as Dimension>::I>>::Output: Integer, <Dl as Dimension>::Th: Add<<Dr as Dimension>::Th>, <<Dl as Dimension>::Th as Add<<Dr as Dimension>::Th>>::Output: Integer, <Dl as Dimension>::N: Add<<Dr as Dimension>::N>, <<Dl as Dimension>::N as Add<<Dr as Dimension>::N>>::Output: Integer, <Dl as Dimension>::J: Add<<Dr as Dimension>::J>, <<Dl as Dimension>::J as Add<<Dr as Dimension>::J>>::Output: Integer, <Dl as Dimension>::Kind: Mul, Dr: Dimension + ?Sized, <Dr as Dimension>::Kind: Mul, U: Units<V> + ?Sized, V: Num + Conversion<V> + Mul,

§

type Output = Quantity<dyn Dimension<Th = <<Dl as Dimension>::Th as Add<<Dr as Dimension>::Th>>::Output, N = <<Dl as Dimension>::N as Add<<Dr as Dimension>::N>>::Output, Kind = dyn Kind, I = <<Dl as Dimension>::I as Add<<Dr as Dimension>::I>>::Output, T = <<Dl as Dimension>::T as Add<<Dr as Dimension>::T>>::Output, L = <<Dl as Dimension>::L as Add<<Dr as Dimension>::L>>::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>, U, V>

The resulting type after applying the * operator.
§

fn mul( self, rhs: Quantity<Dr, U, V> ) -> <Quantity<Dl, U, V> as Mul<Quantity<Dr, U, V>>>::Output

Performs the * operation. Read more
§

impl<D, U, V> Mul<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Mul, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<D, U, V>

The resulting type after applying the * operator.
§

fn mul(self, rhs: V) -> <Quantity<D, U, V> as Mul<V>>::Output

Performs the * operation. Read more
§

impl<D, U, V> MulAssign<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: MulAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + MulAssign,

§

fn mul_assign(&mut self, rhs: V)

Performs the *= operation. Read more
§

impl<D, U, V> Neg for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Neg, U: Units<V> + ?Sized, V: Signed + Conversion<V>,

§

type Output = Quantity<D, U, V>

The resulting type after applying the - operator.
§

fn neg(self) -> <Quantity<D, U, V> as Neg>::Output

Performs the unary - operation. Read more
§

impl<D, U, V> Ord for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Ord,

§

fn cmp(&self, other: &Quantity<D, U, V>) -> Ordering

This method returns an Ordering between self and other. Read more
§

fn max(self, other: Quantity<D, U, V>) -> Quantity<D, U, V>

Compares and returns the maximum of two values. Read more
§

fn min(self, other: Quantity<D, U, V>) -> Quantity<D, U, V>

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl<D, U, V> PartialEq for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn eq(&self, other: &Quantity<D, U, V>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<D, U, V> PartialOrd for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + PartialOrd,

§

fn partial_cmp(&self, other: &Quantity<D, U, V>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
§

fn lt(&self, other: &Quantity<D, U, V>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
§

fn le(&self, other: &Quantity<D, U, V>) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
§

fn gt(&self, other: &Quantity<D, U, V>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
§

fn ge(&self, other: &Quantity<D, U, V>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl<D, U, V> Rem for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Rem, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<D, U, V>

The resulting type after applying the % operator.
§

fn rem(self, rhs: Quantity<D, U, V>) -> <Quantity<D, U, V> as Rem>::Output

Performs the % operation. Read more
§

impl<D, U, V> RemAssign for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: RemAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + RemAssign,

§

fn rem_assign(&mut self, rhs: Quantity<D, U, V>)

Performs the %= operation. Read more
§

impl<D, U, V> Saturating for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Saturating, U: Units<V> + ?Sized, V: Num + Conversion<V> + Saturating,

§

fn saturating_add(self, v: Quantity<D, U, V>) -> Quantity<D, U, V>

Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing.
§

fn saturating_sub(self, v: Quantity<D, U, V>) -> Quantity<D, U, V>

Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing.
§

impl<U, V> Sub<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>

The resulting type after applying the - operator.
§

fn sub( self, rhs: Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> ) -> <Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> as Sub<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>>>::Output

Performs the - operation. Read more
§

impl<D, U, V> Sub for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Sub, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

type Output = Quantity<D, U, V>

The resulting type after applying the - operator.
§

fn sub(self, rhs: Quantity<D, U, V>) -> <Quantity<D, U, V> as Sub>::Output

Performs the - operation. Read more
§

impl<U, V> SubAssign<Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>> for Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn TemperatureKind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V> + SubAssign,

§

fn sub_assign( &mut self, rhs: Quantity<dyn Dimension<Th = PInt<UInt<UTerm, B1>>, N = Z0, Kind = dyn Kind, I = Z0, T = Z0, L = Z0, M = Z0, J = Z0>, U, V> )

Performs the -= operation. Read more
§

impl<D, U, V> SubAssign for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: SubAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + SubAssign,

§

fn sub_assign(&mut self, rhs: Quantity<D, U, V>)

Performs the -= operation. Read more
§

impl<D, U, V> Sum for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V> + Sum,

§

fn sum<I>(iter: I) -> Quantity<D, U, V>
where I: Iterator<Item = Quantity<D, U, V>>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
§

impl<U, V> TryFrom<Duration> for Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>
where V: Num + Conversion<V> + FromPrimitive, second: Conversion<V, T = <V as Conversion<V>>::T>, nanosecond: Conversion<V, T = <V as Conversion<V>>::T>, U: Units<V> + ?Sized,

Attempt to convert the given Duration to a Time.

For possible failure modes, see TryFromError.

§Notes

The Duration to Time conversion is tested to be accurate to within 100 nanoseconds (to allow for floating point rounding error). If greater precision is needed, consider using a different underlying storage type or avoiding the conversion altogether.

§

type Error = TryFromError

The type returned in the event of a conversion error.
§

fn try_from( duration: Duration ) -> Result<Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V>, <Quantity<dyn Dimension<Th = Z0, N = Z0, Kind = dyn Kind, I = Z0, T = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, J = Z0>, U, V> as TryFrom<Duration>>::Error>

Performs the conversion.
§

impl<D, U, V> Zero for Quantity<D, U, V>
where D: Dimension + ?Sized, <D as Dimension>::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V>,

§

fn zero() -> Quantity<D, U, V>

Returns the additive identity element of Self, 0. Read more
§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
§

impl<D, U, V> Copy for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Copy,

§

impl<D, U, V> Eq for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Eq,

Auto Trait Implementations§

§

impl<D: ?Sized, U: ?Sized, V> RefUnwindSafe for Quantity<D, U, V>
where V: RefUnwindSafe,

§

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,

§

impl<D: ?Sized, U: ?Sized, V> Unpin for Quantity<D, U, V>
where V: Unpin,

§

impl<D: ?Sized, U: ?Sized, V> UnwindSafe for Quantity<D, U, V>
where V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,