#[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 Quantity
s. 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
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§
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
source§impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Float + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Float + Conversion<V>,
Implementation of various stdlib trigonometric functions
source§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::T>,
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::T>,
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UTerm, B1>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = PInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn InformationKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn InformationKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn InformationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn InformationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = PInt<UInt<UTerm, B1>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = PInt<UInt<UTerm, B1>>, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = PInt<UInt<UTerm, B1>>, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = NInt<UInt<UInt<UTerm, B1>, B0>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = Z0, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = Z0, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = NInt<UInt<UTerm, B1>>, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Float + Conversion<V>,
radian: Conversion<V, T = V::T>,
ratio: Conversion<V, T = V::T>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Float + Conversion<V>, radian: Conversion<V, T = V::T>, ratio: Conversion<V, T = V::T>,
Implementation of various stdlib functions.
sourcepub fn acosh(self) -> Angle<U, V>
pub fn acosh(self) -> Angle<U, V>
Computes the value of the inverse hyperbolic cosine of the ratio.
sourcepub fn asinh(self) -> Angle<U, V>
pub fn asinh(self) -> Angle<U, V>
Computes the value of the inverse hyperbolic sine of the ratio.
sourcepub fn atanh(self) -> Angle<U, V>
pub fn atanh(self) -> Angle<U, V>
Computes the value of the inverse hyperbolic tangent of the ratio.
sourcepub fn log(self, base: V) -> Ratio<U, V>
pub fn log(self, base: V) -> Ratio<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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn SolidAngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn SolidAngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn SolidAngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn SolidAngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
source§impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn SolidAngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
impl Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn SolidAngleKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = PInt<UInt<UTerm, B1>>> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn TemperatureKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn TemperatureKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn AngleKind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UTerm, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = NInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>, T = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = Z0, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn ConstituentConcentrationKind + 'static, J = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, T = NInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<U, V> Quantity<dyn Dimension<M = PInt<UInt<UTerm, B1>>, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0, I = Z0> + 'static, U, V>where U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn new<N>(v: V) -> Selfwhere
N: Unit + Conversion<V, T = V::T>,
pub fn new<N>(v: V) -> Selfwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn get<N>(&self) -> Vwhere
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> Vwhere N: Unit + Conversion<V, T = V::T>,
sourcepub fn floor<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the largest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn ceil<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn ceil<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = V::T>,
Returns the smallest integer less than or equal to a number in the given measurement unit.
Generic Parameters
N
: Unit.
sourcepub fn round<N>(self) -> Selfwhere
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn round<N>(self) -> Selfwhere V: Float, N: Unit + Conversion<V, T = 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.
sourcepub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N>where
N: Unit,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, 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.
sourcepub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N>where
N: Unit,
pub fn into_format_args<N>( self, unit: N, style: DisplayStyle ) -> QuantityArguments<Dimension, 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.
source§impl<D, U> Quantity<D, U, f32>where
D: Dimension + ?Sized,
U: Units<f32> + ?Sized,
impl<D, U> Quantity<D, U, f32>where D: Dimension + ?Sized, U: Units<f32> + ?Sized,
sourcepub fn is_infinite(self) -> bool
pub fn is_infinite(self) -> bool
Returns true
if this value is positive infinity or negative infinity and
false
otherwise.
sourcepub fn is_normal(self) -> bool
pub fn is_normal(self) -> bool
Returns true
if the number is neither zero, infinite, subnormal, or NAN
.
sourcepub fn cbrt(
self
) -> Quantity<ISQ<PartialQuot<D::L, P3>, PartialQuot<D::M, P3>, PartialQuot<D::T, P3>, PartialQuot<D::I, P3>, PartialQuot<D::Th, P3>, PartialQuot<D::N, P3>, PartialQuot<D::J, P3>>, U, f32>where
D::L: PartialDiv<P3>,
<D::L as PartialDiv<P3>>::Output: Integer,
D::M: PartialDiv<P3>,
<D::M as PartialDiv<P3>>::Output: Integer,
D::T: PartialDiv<P3>,
<D::T as PartialDiv<P3>>::Output: Integer,
D::I: PartialDiv<P3>,
<D::I as PartialDiv<P3>>::Output: Integer,
D::Th: PartialDiv<P3>,
<D::Th as PartialDiv<P3>>::Output: Integer,
D::N: PartialDiv<P3>,
<D::N as PartialDiv<P3>>::Output: Integer,
D::J: PartialDiv<P3>,
<D::J as PartialDiv<P3>>::Output: Integer,
D::Kind: Div,
pub fn cbrt( self ) -> Quantity<ISQ<PartialQuot<D::L, P3>, PartialQuot<D::M, P3>, PartialQuot<D::T, P3>, PartialQuot<D::I, P3>, PartialQuot<D::Th, P3>, PartialQuot<D::N, P3>, PartialQuot<D::J, P3>>, U, f32>where D::L: PartialDiv<P3>, <D::L as PartialDiv<P3>>::Output: Integer, D::M: PartialDiv<P3>, <D::M as PartialDiv<P3>>::Output: Integer, D::T: PartialDiv<P3>, <D::T as PartialDiv<P3>>::Output: Integer, D::I: PartialDiv<P3>, <D::I as PartialDiv<P3>>::Output: Integer, D::Th: PartialDiv<P3>, <D::Th as PartialDiv<P3>>::Output: Integer, D::N: PartialDiv<P3>, <D::N as PartialDiv<P3>>::Output: Integer, D::J: PartialDiv<P3>, <D::J as PartialDiv<P3>>::Output: Integer, D::Kind: Div,
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();
sourcepub fn mul_add<Da, Ua, Ub>(
self,
a: Quantity<Da, Ua, f32>,
b: Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, Ub, f32>
) -> Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, U, f32>where
D::L: Add<Da::L>,
<D::L as Add<Da::L>>::Output: Integer,
D::M: Add<Da::M>,
<D::M as Add<Da::M>>::Output: Integer,
D::T: Add<Da::T>,
<D::T as Add<Da::T>>::Output: Integer,
D::I: Add<Da::I>,
<D::I as Add<Da::I>>::Output: Integer,
D::Th: Add<Da::Th>,
<D::Th as Add<Da::Th>>::Output: Integer,
D::N: Add<Da::N>,
<D::N as Add<Da::N>>::Output: Integer,
D::J: Add<Da::J>,
<D::J as Add<Da::J>>::Output: Integer,
D::Kind: Mul,
Da: Dimension + ?Sized,
Da::Kind: Mul,
Ua: Units<f32> + ?Sized,
Ub: Units<f32> + ?Sized,
pub fn mul_add<Da, Ua, Ub>( self, a: Quantity<Da, Ua, f32>, b: Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, Ub, f32> ) -> Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, U, f32>where D::L: Add<Da::L>, <D::L as Add<Da::L>>::Output: Integer, D::M: Add<Da::M>, <D::M as Add<Da::M>>::Output: Integer, D::T: Add<Da::T>, <D::T as Add<Da::T>>::Output: Integer, D::I: Add<Da::I>, <D::I as Add<Da::I>>::Output: Integer, D::Th: Add<Da::Th>, <D::Th as Add<Da::Th>>::Output: Integer, D::N: Add<Da::N>, <D::N as Add<Da::N>>::Output: Integer, D::J: Add<Da::J>, <D::J as Add<Da::J>>::Output: Integer, D::Kind: Mul, Da: Dimension + ?Sized, Da::Kind: Mul, Ua: Units<f32> + ?Sized, Ub: Units<f32> + ?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 parametera
.Ua
: Base units for parametera
.Ub
: Base units for parameterb
.
sourcepub fn powi<E>(
self,
_e: E
) -> Quantity<ISQ<Prod<D::L, E>, Prod<D::M, E>, Prod<D::T, E>, Prod<D::I, E>, Prod<D::Th, E>, Prod<D::N, E>, Prod<D::J, E>>, U, f32>where
D::L: Mul<E>,
<D::L as Mul<E>>::Output: Integer,
D::M: Mul<E>,
<D::M as Mul<E>>::Output: Integer,
D::T: Mul<E>,
<D::T as Mul<E>>::Output: Integer,
D::I: Mul<E>,
<D::I as Mul<E>>::Output: Integer,
D::Th: Mul<E>,
<D::Th as Mul<E>>::Output: Integer,
D::N: Mul<E>,
<D::N as Mul<E>>::Output: Integer,
D::J: Mul<E>,
<D::J as Mul<E>>::Output: Integer,
D::Kind: Mul,
E: Integer,
pub fn powi<E>( self, _e: E ) -> Quantity<ISQ<Prod<D::L, E>, Prod<D::M, E>, Prod<D::T, E>, Prod<D::I, E>, Prod<D::Th, E>, Prod<D::N, E>, Prod<D::J, E>>, U, f32>where D::L: Mul<E>, <D::L as Mul<E>>::Output: Integer, D::M: Mul<E>, <D::M as Mul<E>>::Output: Integer, D::T: Mul<E>, <D::T as Mul<E>>::Output: Integer, D::I: Mul<E>, <D::I as Mul<E>>::Output: Integer, D::Th: Mul<E>, <D::Th as Mul<E>>::Output: Integer, D::N: Mul<E>, <D::N as Mul<E>>::Output: Integer, D::J: Mul<E>, <D::J as Mul<E>>::Output: Integer, D::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.
sourcepub fn sqrt(
self
) -> Quantity<ISQ<PartialQuot<D::L, P2>, PartialQuot<D::M, P2>, PartialQuot<D::T, P2>, PartialQuot<D::I, P2>, PartialQuot<D::Th, P2>, PartialQuot<D::N, P2>, PartialQuot<D::J, P2>>, U, f32>where
D::L: PartialDiv<P2>,
<D::L as PartialDiv<P2>>::Output: Integer,
D::M: PartialDiv<P2>,
<D::M as PartialDiv<P2>>::Output: Integer,
D::T: PartialDiv<P2>,
<D::T as PartialDiv<P2>>::Output: Integer,
D::I: PartialDiv<P2>,
<D::I as PartialDiv<P2>>::Output: Integer,
D::Th: PartialDiv<P2>,
<D::Th as PartialDiv<P2>>::Output: Integer,
D::N: PartialDiv<P2>,
<D::N as PartialDiv<P2>>::Output: Integer,
D::J: PartialDiv<P2>,
<D::J as PartialDiv<P2>>::Output: Integer,
D::Kind: Div,
pub fn sqrt( self ) -> Quantity<ISQ<PartialQuot<D::L, P2>, PartialQuot<D::M, P2>, PartialQuot<D::T, P2>, PartialQuot<D::I, P2>, PartialQuot<D::Th, P2>, PartialQuot<D::N, P2>, PartialQuot<D::J, P2>>, U, f32>where D::L: PartialDiv<P2>, <D::L as PartialDiv<P2>>::Output: Integer, D::M: PartialDiv<P2>, <D::M as PartialDiv<P2>>::Output: Integer, D::T: PartialDiv<P2>, <D::T as PartialDiv<P2>>::Output: Integer, D::I: PartialDiv<P2>, <D::I as PartialDiv<P2>>::Output: Integer, D::Th: PartialDiv<P2>, <D::Th as PartialDiv<P2>>::Output: Integer, D::N: PartialDiv<P2>, <D::N as PartialDiv<P2>>::Output: Integer, D::J: PartialDiv<P2>, <D::J as PartialDiv<P2>>::Output: Integer, D::Kind: Div,
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();
source§impl<D, U> Quantity<D, U, f64>where
D: Dimension + ?Sized,
U: Units<f64> + ?Sized,
impl<D, U> Quantity<D, U, f64>where D: Dimension + ?Sized, U: Units<f64> + ?Sized,
sourcepub fn is_infinite(self) -> bool
pub fn is_infinite(self) -> bool
Returns true
if this value is positive infinity or negative infinity and
false
otherwise.
sourcepub fn is_normal(self) -> bool
pub fn is_normal(self) -> bool
Returns true
if the number is neither zero, infinite, subnormal, or NAN
.
sourcepub fn cbrt(
self
) -> Quantity<ISQ<PartialQuot<D::L, P3>, PartialQuot<D::M, P3>, PartialQuot<D::T, P3>, PartialQuot<D::I, P3>, PartialQuot<D::Th, P3>, PartialQuot<D::N, P3>, PartialQuot<D::J, P3>>, U, f64>where
D::L: PartialDiv<P3>,
<D::L as PartialDiv<P3>>::Output: Integer,
D::M: PartialDiv<P3>,
<D::M as PartialDiv<P3>>::Output: Integer,
D::T: PartialDiv<P3>,
<D::T as PartialDiv<P3>>::Output: Integer,
D::I: PartialDiv<P3>,
<D::I as PartialDiv<P3>>::Output: Integer,
D::Th: PartialDiv<P3>,
<D::Th as PartialDiv<P3>>::Output: Integer,
D::N: PartialDiv<P3>,
<D::N as PartialDiv<P3>>::Output: Integer,
D::J: PartialDiv<P3>,
<D::J as PartialDiv<P3>>::Output: Integer,
D::Kind: Div,
pub fn cbrt( self ) -> Quantity<ISQ<PartialQuot<D::L, P3>, PartialQuot<D::M, P3>, PartialQuot<D::T, P3>, PartialQuot<D::I, P3>, PartialQuot<D::Th, P3>, PartialQuot<D::N, P3>, PartialQuot<D::J, P3>>, U, f64>where D::L: PartialDiv<P3>, <D::L as PartialDiv<P3>>::Output: Integer, D::M: PartialDiv<P3>, <D::M as PartialDiv<P3>>::Output: Integer, D::T: PartialDiv<P3>, <D::T as PartialDiv<P3>>::Output: Integer, D::I: PartialDiv<P3>, <D::I as PartialDiv<P3>>::Output: Integer, D::Th: PartialDiv<P3>, <D::Th as PartialDiv<P3>>::Output: Integer, D::N: PartialDiv<P3>, <D::N as PartialDiv<P3>>::Output: Integer, D::J: PartialDiv<P3>, <D::J as PartialDiv<P3>>::Output: Integer, D::Kind: Div,
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();
sourcepub fn mul_add<Da, Ua, Ub>(
self,
a: Quantity<Da, Ua, f64>,
b: Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, Ub, f64>
) -> Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, U, f64>where
D::L: Add<Da::L>,
<D::L as Add<Da::L>>::Output: Integer,
D::M: Add<Da::M>,
<D::M as Add<Da::M>>::Output: Integer,
D::T: Add<Da::T>,
<D::T as Add<Da::T>>::Output: Integer,
D::I: Add<Da::I>,
<D::I as Add<Da::I>>::Output: Integer,
D::Th: Add<Da::Th>,
<D::Th as Add<Da::Th>>::Output: Integer,
D::N: Add<Da::N>,
<D::N as Add<Da::N>>::Output: Integer,
D::J: Add<Da::J>,
<D::J as Add<Da::J>>::Output: Integer,
D::Kind: Mul,
Da: Dimension + ?Sized,
Da::Kind: Mul,
Ua: Units<f64> + ?Sized,
Ub: Units<f64> + ?Sized,
pub fn mul_add<Da, Ua, Ub>( self, a: Quantity<Da, Ua, f64>, b: Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, Ub, f64> ) -> Quantity<ISQ<Sum<D::L, Da::L>, Sum<D::M, Da::M>, Sum<D::T, Da::T>, Sum<D::I, Da::I>, Sum<D::Th, Da::Th>, Sum<D::N, Da::N>, Sum<D::J, Da::J>>, U, f64>where D::L: Add<Da::L>, <D::L as Add<Da::L>>::Output: Integer, D::M: Add<Da::M>, <D::M as Add<Da::M>>::Output: Integer, D::T: Add<Da::T>, <D::T as Add<Da::T>>::Output: Integer, D::I: Add<Da::I>, <D::I as Add<Da::I>>::Output: Integer, D::Th: Add<Da::Th>, <D::Th as Add<Da::Th>>::Output: Integer, D::N: Add<Da::N>, <D::N as Add<Da::N>>::Output: Integer, D::J: Add<Da::J>, <D::J as Add<Da::J>>::Output: Integer, D::Kind: Mul, Da: Dimension + ?Sized, Da::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 parametera
.Ua
: Base units for parametera
.Ub
: Base units for parameterb
.
sourcepub fn powi<E>(
self,
_e: E
) -> Quantity<ISQ<Prod<D::L, E>, Prod<D::M, E>, Prod<D::T, E>, Prod<D::I, E>, Prod<D::Th, E>, Prod<D::N, E>, Prod<D::J, E>>, U, f64>where
D::L: Mul<E>,
<D::L as Mul<E>>::Output: Integer,
D::M: Mul<E>,
<D::M as Mul<E>>::Output: Integer,
D::T: Mul<E>,
<D::T as Mul<E>>::Output: Integer,
D::I: Mul<E>,
<D::I as Mul<E>>::Output: Integer,
D::Th: Mul<E>,
<D::Th as Mul<E>>::Output: Integer,
D::N: Mul<E>,
<D::N as Mul<E>>::Output: Integer,
D::J: Mul<E>,
<D::J as Mul<E>>::Output: Integer,
D::Kind: Mul,
E: Integer,
pub fn powi<E>( self, _e: E ) -> Quantity<ISQ<Prod<D::L, E>, Prod<D::M, E>, Prod<D::T, E>, Prod<D::I, E>, Prod<D::Th, E>, Prod<D::N, E>, Prod<D::J, E>>, U, f64>where D::L: Mul<E>, <D::L as Mul<E>>::Output: Integer, D::M: Mul<E>, <D::M as Mul<E>>::Output: Integer, D::T: Mul<E>, <D::T as Mul<E>>::Output: Integer, D::I: Mul<E>, <D::I as Mul<E>>::Output: Integer, D::Th: Mul<E>, <D::Th as Mul<E>>::Output: Integer, D::N: Mul<E>, <D::N as Mul<E>>::Output: Integer, D::J: Mul<E>, <D::J as Mul<E>>::Output: Integer, D::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.
sourcepub fn sqrt(
self
) -> Quantity<ISQ<PartialQuot<D::L, P2>, PartialQuot<D::M, P2>, PartialQuot<D::T, P2>, PartialQuot<D::I, P2>, PartialQuot<D::Th, P2>, PartialQuot<D::N, P2>, PartialQuot<D::J, P2>>, U, f64>where
D::L: PartialDiv<P2>,
<D::L as PartialDiv<P2>>::Output: Integer,
D::M: PartialDiv<P2>,
<D::M as PartialDiv<P2>>::Output: Integer,
D::T: PartialDiv<P2>,
<D::T as PartialDiv<P2>>::Output: Integer,
D::I: PartialDiv<P2>,
<D::I as PartialDiv<P2>>::Output: Integer,
D::Th: PartialDiv<P2>,
<D::Th as PartialDiv<P2>>::Output: Integer,
D::N: PartialDiv<P2>,
<D::N as PartialDiv<P2>>::Output: Integer,
D::J: PartialDiv<P2>,
<D::J as PartialDiv<P2>>::Output: Integer,
D::Kind: Div,
pub fn sqrt( self ) -> Quantity<ISQ<PartialQuot<D::L, P2>, PartialQuot<D::M, P2>, PartialQuot<D::T, P2>, PartialQuot<D::I, P2>, PartialQuot<D::Th, P2>, PartialQuot<D::N, P2>, PartialQuot<D::J, P2>>, U, f64>where D::L: PartialDiv<P2>, <D::L as PartialDiv<P2>>::Output: Integer, D::M: PartialDiv<P2>, <D::M as PartialDiv<P2>>::Output: Integer, D::T: PartialDiv<P2>, <D::T as PartialDiv<P2>>::Output: Integer, D::I: PartialDiv<P2>, <D::I as PartialDiv<P2>>::Output: Integer, D::Th: PartialDiv<P2>, <D::Th as PartialDiv<P2>>::Output: Integer, D::N: PartialDiv<P2>, <D::N as PartialDiv<P2>>::Output: Integer, D::J: PartialDiv<P2>, <D::J as PartialDiv<P2>>::Output: Integer, D::Kind: Div,
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();
source§impl<D, U, V> Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, U, V> Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V>,
sourcepub fn classify(self) -> FpCategorywhere
V: Float,
pub fn classify(self) -> FpCategorywhere 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.
sourcepub fn hypot<Ur>(self, other: Quantity<D, Ur, V>) -> Selfwhere
V: Float,
Ur: Units<V> + ?Sized,
pub fn hypot<Ur>(self, other: Quantity<D, Ur, V>) -> Selfwhere V: Float, Ur: Units<V> + ?Sized,
Calculates the length of the hypotenuse of a right-angle triangle given the legs.
sourcepub fn abs(self) -> Selfwhere
V: Signed,
pub fn abs(self) -> Selfwhere V: Signed,
Computes the absolute value of self
. Returns NAN
if the quantity is
NAN
.
sourcepub fn signum(self) -> Selfwhere
V: Signed,
pub fn signum(self) -> Selfwhere V: Signed,
Returns a quantity that represents the sign of self
.
1.0
of the base unit if the number is positive,+0.0
, orINFINITY
.-1.0
of the base unit if the number is negative,-0.0
, orNEG_INFINITY
.NAN
if the number isNAN
.
sourcepub fn is_sign_positive(self) -> boolwhere
V: Float,
pub fn is_sign_positive(self) -> boolwhere V: Float,
Returns true
if self
’s sign bit is positive, including +0.0
and
INFINITY
.
sourcepub fn is_sign_negative(self) -> boolwhere
V: Float,
pub fn is_sign_negative(self) -> boolwhere V: Float,
Returns true
if self
’s sign is negative, including -0.0
and
NEG_INFINITY
.
sourcepub fn recip(
self
) -> Quantity<ISQ<Negate<D::L>, Negate<D::M>, Negate<D::T>, Negate<D::I>, Negate<D::Th>, Negate<D::N>, Negate<D::J>>, U, V>where
D::L: Neg,
<D::L as Neg>::Output: Integer,
D::M: Neg,
<D::M as Neg>::Output: Integer,
D::T: Neg,
<D::T as Neg>::Output: Integer,
D::I: Neg,
<D::I as Neg>::Output: Integer,
D::Th: Neg,
<D::Th as Neg>::Output: Integer,
D::N: Neg,
<D::N as Neg>::Output: Integer,
D::J: Neg,
<D::J as Neg>::Output: Integer,
D::Kind: Div,
V: Float,
pub fn recip( self ) -> Quantity<ISQ<Negate<D::L>, Negate<D::M>, Negate<D::T>, Negate<D::I>, Negate<D::Th>, Negate<D::N>, Negate<D::J>>, U, V>where D::L: Neg, <D::L as Neg>::Output: Integer, D::M: Neg, <D::M as Neg>::Output: Integer, D::T: Neg, <D::T as Neg>::Output: Integer, D::I: Neg, <D::I as Neg>::Output: Integer, D::Th: Neg, <D::Th as Neg>::Output: Integer, D::N: Neg, <D::N as Neg>::Output: Integer, D::J: Neg, <D::J as Neg>::Output: Integer, D::Kind: Div, V: Float,
Takes the reciprocal (inverse) of a number, 1/x
.
let f: Frequency = Time::new::<second>(1.0).recip();
Trait Implementations§
source§impl<D, Ul, Ur, V> Add<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
D::Kind: Add,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, Ul, Ur, V> Add<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, D::Kind: Add, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<Ul, Ur, V> Add<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<Ul, Ur, V> Add<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<Ul, Ur, V> Add<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn TemperatureKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for TemperatureInterval<Ul, V>where
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<Ul, Ur, V> Add<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn TemperatureKind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for TemperatureInterval<Ul, V>where Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<D, Ul, Ur, V> AddAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
D::Kind: AddAssign,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + AddAssign<V>,
impl<D, Ul, Ur, V> AddAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, D::Kind: AddAssign, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + AddAssign<V>,
source§fn add_assign(&mut self, rhs: Quantity<D, Ur, V>)
fn add_assign(&mut self, rhs: Quantity<D, Ur, V>)
+=
operation. Read moresource§impl<Ul, Ur, V> AddAssign<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + AddAssign<V>,
impl<Ul, Ur, V> AddAssign<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + AddAssign<V>,
source§fn add_assign(&mut self, rhs: TemperatureInterval<Ur, V>)
fn add_assign(&mut self, rhs: TemperatureInterval<Ur, V>)
+=
operation. Read moresource§impl<D, U, V> Clone for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Clone,
impl<D, U, V> Clone for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Clone,
source§impl<D, U, V> ConstZero for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + ConstZero,
impl<D, U, V> ConstZero for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + ConstZero,
source§impl<D, U, V> Debug for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Debug,
impl<D, U, V> Debug for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Debug,
source§impl<D, U, V> Default for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Default,
impl<D, U, V> Default for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Default,
source§impl<'de, D, U, V> Deserialize<'de> for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Deserialize<'de>,
impl<'de, D, U, V> Deserialize<'de> for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Deserialize<'de>,
source§fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>where
De: Deserializer<'de>,
fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>where De: Deserializer<'de>,
source§impl<D, U> Div<Quantity<D, U, BigInt>> for BigIntwhere
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<BigInt> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, BigInt>> for BigIntwhere D: Dimension + ?Sized, D::Kind: Div, U: Units<BigInt> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, BigInt>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, BigInt>
/
operator.source§impl<D, U> Div<Quantity<D, U, BigUint>> for BigUintwhere
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<BigUint> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, BigUint>> for BigUintwhere D: Dimension + ?Sized, D::Kind: Div, U: Units<BigUint> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, BigUint>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, BigUint>
/
operator.source§impl<D, U> Div<Quantity<D, U, Ratio<BigInt>>> for BigRationalwhere
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<BigRational> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, Ratio<BigInt>>> for BigRationalwhere D: Dimension + ?Sized, D::Kind: Div, U: Units<BigRational> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, Ratio<BigInt>>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, Ratio<BigInt>>
/
operator.source§impl<D, U> Div<Quantity<D, U, Ratio<i32>>> for Rational32where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<Rational32> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, Ratio<i32>>> for Rational32where D: Dimension + ?Sized, D::Kind: Div, U: Units<Rational32> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i32>>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i32>>
/
operator.source§impl<D, U> Div<Quantity<D, U, Ratio<i64>>> for Rational64where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<Rational64> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, Ratio<i64>>> for Rational64where D: Dimension + ?Sized, D::Kind: Div, U: Units<Rational64> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i64>>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i64>>
/
operator.source§impl<D, U> Div<Quantity<D, U, f32>> for f32where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<f32> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, f32>> for f32where D: Dimension + ?Sized, D::Kind: Div, U: Units<f32> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, f32>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, f32>
/
operator.source§impl<D, U> Div<Quantity<D, U, f64>> for f64where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<f64> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, f64>> for f64where D: Dimension + ?Sized, D::Kind: Div, U: Units<f64> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, f64>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, f64>
/
operator.source§impl<D, U> Div<Quantity<D, U, i32>> for i32where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<i32> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, i32>> for i32where D: Dimension + ?Sized, D::Kind: Div, U: Units<i32> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, i32>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, i32>
/
operator.source§impl<D, U> Div<Quantity<D, U, i64>> for i64where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<i64> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, i64>> for i64where D: Dimension + ?Sized, D::Kind: Div, U: Units<i64> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, i64>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, i64>
/
operator.source§impl<D, U> Div<Quantity<D, U, isize>> for isizewhere
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<isize> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, isize>> for isizewhere D: Dimension + ?Sized, D::Kind: Div, U: Units<isize> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, isize>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, isize>
/
operator.source§impl<D, U> Div<Quantity<D, U, u32>> for u32where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<u32> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, u32>> for u32where D: Dimension + ?Sized, D::Kind: Div, U: Units<u32> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, u32>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, u32>
/
operator.source§impl<D, U> Div<Quantity<D, U, u64>> for u64where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<u64> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, u64>> for u64where D: Dimension + ?Sized, D::Kind: Div, U: Units<u64> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, u64>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, u64>
/
operator.source§impl<D, U> Div<Quantity<D, U, usize>> for usizewhere
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<usize> + ?Sized,
Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>,
<Z0 as Sub<D::L>>::Output: Integer,
<Z0 as Sub<D::M>>::Output: Integer,
<Z0 as Sub<D::T>>::Output: Integer,
<Z0 as Sub<D::I>>::Output: Integer,
<Z0 as Sub<D::Th>>::Output: Integer,
<Z0 as Sub<D::N>>::Output: Integer,
<Z0 as Sub<D::J>>::Output: Integer,
impl<D, U> Div<Quantity<D, U, usize>> for usizewhere D: Dimension + ?Sized, D::Kind: Div, U: Units<usize> + ?Sized, Z0: Sub<D::L> + Sub<D::M> + Sub<D::T> + Sub<D::I> + Sub<D::Th> + Sub<D::N> + Sub<D::J>, <Z0 as Sub<D::L>>::Output: Integer, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer, <Z0 as Sub<D::I>>::Output: Integer, <Z0 as Sub<D::Th>>::Output: Integer, <Z0 as Sub<D::N>>::Output: Integer, <Z0 as Sub<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, usize>
type Output = Quantity<dyn Dimension<M = <Z0 as Sub<<D as Dimension>::M>>::Output, Th = <Z0 as Sub<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Sub<<D as Dimension>::J>>::Output, L = <Z0 as Sub<<D as Dimension>::L>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, N = <Z0 as Sub<<D as Dimension>::N>>::Output, I = <Z0 as Sub<<D as Dimension>::I>>::Output> + 'static, U, usize>
/
operator.source§impl<Dl, Dr, Ul, Ur, V> Div<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V>where
Dl: Dimension + ?Sized,
Dl::L: Sub<Dr::L>,
<Dl::L as Sub<Dr::L>>::Output: Integer,
Dl::M: Sub<Dr::M>,
<Dl::M as Sub<Dr::M>>::Output: Integer,
Dl::T: Sub<Dr::T>,
<Dl::T as Sub<Dr::T>>::Output: Integer,
Dl::I: Sub<Dr::I>,
<Dl::I as Sub<Dr::I>>::Output: Integer,
Dl::Th: Sub<Dr::Th>,
<Dl::Th as Sub<Dr::Th>>::Output: Integer,
Dl::N: Sub<Dr::N>,
<Dl::N as Sub<Dr::N>>::Output: Integer,
Dl::J: Sub<Dr::J>,
<Dl::J as Sub<Dr::J>>::Output: Integer,
Dl::Kind: Div,
Dr: Dimension + ?Sized,
Dr::Kind: Div,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + Div<V>,
impl<Dl, Dr, Ul, Ur, V> Div<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V>where Dl: Dimension + ?Sized, Dl::L: Sub<Dr::L>, <Dl::L as Sub<Dr::L>>::Output: Integer, Dl::M: Sub<Dr::M>, <Dl::M as Sub<Dr::M>>::Output: Integer, Dl::T: Sub<Dr::T>, <Dl::T as Sub<Dr::T>>::Output: Integer, Dl::I: Sub<Dr::I>, <Dl::I as Sub<Dr::I>>::Output: Integer, Dl::Th: Sub<Dr::Th>, <Dl::Th as Sub<Dr::Th>>::Output: Integer, Dl::N: Sub<Dr::N>, <Dl::N as Sub<Dr::N>>::Output: Integer, Dl::J: Sub<Dr::J>, <Dl::J as Sub<Dr::J>>::Output: Integer, Dl::Kind: Div, Dr: Dimension + ?Sized, Dr::Kind: Div, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + Div<V>,
§type Output = Quantity<dyn Dimension<M = <<Dl as Dimension>::M as Sub<<Dr as Dimension>::M>>::Output, Th = <<Dl as Dimension>::Th as Sub<<Dr as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, J = <<Dl as Dimension>::J as Sub<<Dr as Dimension>::J>>::Output, L = <<Dl as Dimension>::L as Sub<<Dr as Dimension>::L>>::Output, T = <<Dl as Dimension>::T as Sub<<Dr as Dimension>::T>>::Output, N = <<Dl as Dimension>::N as Sub<<Dr as Dimension>::N>>::Output, I = <<Dl as Dimension>::I as Sub<<Dr as Dimension>::I>>::Output> + 'static, Ul, V>
type Output = Quantity<dyn Dimension<M = <<Dl as Dimension>::M as Sub<<Dr as Dimension>::M>>::Output, Th = <<Dl as Dimension>::Th as Sub<<Dr as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, J = <<Dl as Dimension>::J as Sub<<Dr as Dimension>::J>>::Output, L = <<Dl as Dimension>::L as Sub<<Dr as Dimension>::L>>::Output, T = <<Dl as Dimension>::T as Sub<<Dr as Dimension>::T>>::Output, N = <<Dl as Dimension>::N as Sub<<Dr as Dimension>::N>>::Output, I = <<Dl as Dimension>::I as Sub<<Dr as Dimension>::I>>::Output> + 'static, Ul, V>
/
operator.source§impl<D, U, V> Div<V> for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: Div,
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, U, V> Div<V> for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: Div, U: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<D, U, V> DivAssign<V> for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: DivAssign,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + DivAssign<V>,
impl<D, U, V> DivAssign<V> for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: DivAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + DivAssign<V>,
source§fn div_assign(&mut self, rhs: V)
fn div_assign(&mut self, rhs: V)
/=
operation. Read moresource§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn AngleKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn AngleKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn ConstituentConcentrationKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn ConstituentConcentrationKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn InformationKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn InformationKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn AngleKind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn AngleKind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn ConstituentConcentrationKind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn ConstituentConcentrationKind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn InformationKind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn InformationKind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn SolidAngleKind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn Kind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn SolidAngleKind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn SolidAngleKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<L, M, T, I, Th, N, J, Ul, Ur, V> From<Quantity<dyn Dimension<M = M, Th = Th, Kind = dyn SolidAngleKind + 'static, J = J, L = L, T = T, N = N, I = I> + 'static, Ur, V>> for Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>where L: Integer, M: Integer, T: Integer, I: Integer, Th: Integer, N: Integer, J: Integer, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, BigInt>> for BigIntwhere
U: Units<BigInt> + ?Sized,
BigInt: Num + Conversion<BigInt>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, BigInt>> for BigIntwhere U: Units<BigInt> + ?Sized, BigInt: Num + Conversion<BigInt>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, BigUint>> for BigUintwhere
U: Units<BigUint> + ?Sized,
BigUint: Num + Conversion<BigUint>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, BigUint>> for BigUintwhere U: Units<BigUint> + ?Sized, BigUint: Num + Conversion<BigUint>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, Ratio<BigInt>>> for BigRationalwhere
U: Units<BigRational> + ?Sized,
BigRational: Num + Conversion<BigRational>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, Ratio<BigInt>>> for BigRationalwhere U: Units<BigRational> + ?Sized, BigRational: Num + Conversion<BigRational>,
source§fn from(t: Ratio<U, BigRational>) -> Self
fn from(t: Ratio<U, BigRational>) -> Self
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, Ratio<i32>>> for Rational32where
U: Units<Rational32> + ?Sized,
Rational32: Num + Conversion<Rational32>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, Ratio<i32>>> for Rational32where U: Units<Rational32> + ?Sized, Rational32: Num + Conversion<Rational32>,
source§fn from(t: Ratio<U, Rational32>) -> Self
fn from(t: Ratio<U, Rational32>) -> Self
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, Ratio<i64>>> for Rational64where
U: Units<Rational64> + ?Sized,
Rational64: Num + Conversion<Rational64>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, Ratio<i64>>> for Rational64where U: Units<Rational64> + ?Sized, Rational64: Num + Conversion<Rational64>,
source§fn from(t: Ratio<U, Rational64>) -> Self
fn from(t: Ratio<U, Rational64>) -> Self
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, f32>> for f32where
U: Units<f32> + ?Sized,
f32: Num + Conversion<f32>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, f32>> for f32where U: Units<f32> + ?Sized, f32: Num + Conversion<f32>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, f64>> for f64where
U: Units<f64> + ?Sized,
f64: Num + Conversion<f64>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, f64>> for f64where U: Units<f64> + ?Sized, f64: Num + Conversion<f64>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, i32>> for i32where
U: Units<i32> + ?Sized,
i32: Num + Conversion<i32>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, i32>> for i32where U: Units<i32> + ?Sized, i32: Num + Conversion<i32>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, i64>> for i64where
U: Units<i64> + ?Sized,
i64: Num + Conversion<i64>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, i64>> for i64where U: Units<i64> + ?Sized, i64: Num + Conversion<i64>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, isize>> for isizewhere
U: Units<isize> + ?Sized,
isize: Num + Conversion<isize>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, isize>> for isizewhere U: Units<isize> + ?Sized, isize: Num + Conversion<isize>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, u32>> for u32where
U: Units<u32> + ?Sized,
u32: Num + Conversion<u32>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, u32>> for u32where U: Units<u32> + ?Sized, u32: Num + Conversion<u32>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, u64>> for u64where
U: Units<u64> + ?Sized,
u64: Num + Conversion<u64>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, u64>> for u64where U: Units<u64> + ?Sized, u64: Num + Conversion<u64>,
source§impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, usize>> for usizewhere
U: Units<usize> + ?Sized,
usize: Num + Conversion<usize>,
impl<U> From<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, U, usize>> for usizewhere U: Units<usize> + ?Sized, usize: Num + Conversion<usize>,
source§impl<D, U, V> Hash for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Hash,
impl<D, U, V> Hash for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Hash,
source§impl<D, U> Mul<Quantity<D, U, BigInt>> for BigIntwhere
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<BigInt> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, BigInt>> for BigIntwhere D: Dimension + ?Sized, D::Kind: Mul, U: Units<BigInt> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, BigInt>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, BigInt>
*
operator.source§impl<D, U> Mul<Quantity<D, U, BigUint>> for BigUintwhere
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<BigUint> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, BigUint>> for BigUintwhere D: Dimension + ?Sized, D::Kind: Mul, U: Units<BigUint> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, BigUint>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, BigUint>
*
operator.source§impl<D, U> Mul<Quantity<D, U, Ratio<BigInt>>> for BigRationalwhere
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<BigRational> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, Ratio<BigInt>>> for BigRationalwhere D: Dimension + ?Sized, D::Kind: Mul, U: Units<BigRational> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, Ratio<BigInt>>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, Ratio<BigInt>>
*
operator.source§impl<D, U> Mul<Quantity<D, U, Ratio<i32>>> for Rational32where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<Rational32> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, Ratio<i32>>> for Rational32where D: Dimension + ?Sized, D::Kind: Mul, U: Units<Rational32> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i32>>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i32>>
*
operator.source§impl<D, U> Mul<Quantity<D, U, Ratio<i64>>> for Rational64where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<Rational64> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, Ratio<i64>>> for Rational64where D: Dimension + ?Sized, D::Kind: Mul, U: Units<Rational64> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i64>>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, Ratio<i64>>
*
operator.source§impl<D, U> Mul<Quantity<D, U, f32>> for f32where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<f32> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, f32>> for f32where D: Dimension + ?Sized, D::Kind: Mul, U: Units<f32> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, f32>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, f32>
*
operator.source§impl<D, U> Mul<Quantity<D, U, f64>> for f64where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<f64> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, f64>> for f64where D: Dimension + ?Sized, D::Kind: Mul, U: Units<f64> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, f64>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, f64>
*
operator.source§impl<D, U> Mul<Quantity<D, U, i32>> for i32where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<i32> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, i32>> for i32where D: Dimension + ?Sized, D::Kind: Mul, U: Units<i32> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, i32>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, i32>
*
operator.source§impl<D, U> Mul<Quantity<D, U, i64>> for i64where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<i64> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, i64>> for i64where D: Dimension + ?Sized, D::Kind: Mul, U: Units<i64> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, i64>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, i64>
*
operator.source§impl<D, U> Mul<Quantity<D, U, isize>> for isizewhere
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<isize> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, isize>> for isizewhere D: Dimension + ?Sized, D::Kind: Mul, U: Units<isize> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, isize>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, isize>
*
operator.source§impl<D, U> Mul<Quantity<D, U, u32>> for u32where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<u32> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, u32>> for u32where D: Dimension + ?Sized, D::Kind: Mul, U: Units<u32> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, u32>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, u32>
*
operator.source§impl<D, U> Mul<Quantity<D, U, u64>> for u64where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<u64> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, u64>> for u64where D: Dimension + ?Sized, D::Kind: Mul, U: Units<u64> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, u64>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, u64>
*
operator.source§impl<D, U> Mul<Quantity<D, U, usize>> for usizewhere
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<usize> + ?Sized,
Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>,
<Z0 as Add<D::L>>::Output: Integer,
<Z0 as Add<D::M>>::Output: Integer,
<Z0 as Add<D::T>>::Output: Integer,
<Z0 as Add<D::I>>::Output: Integer,
<Z0 as Add<D::Th>>::Output: Integer,
<Z0 as Add<D::N>>::Output: Integer,
<Z0 as Add<D::J>>::Output: Integer,
impl<D, U> Mul<Quantity<D, U, usize>> for usizewhere D: Dimension + ?Sized, D::Kind: Mul, U: Units<usize> + ?Sized, Z0: Add<D::L> + Add<D::M> + Add<D::T> + Add<D::I> + Add<D::Th> + Add<D::N> + Add<D::J>, <Z0 as Add<D::L>>::Output: Integer, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer, <Z0 as Add<D::I>>::Output: Integer, <Z0 as Add<D::Th>>::Output: Integer, <Z0 as Add<D::N>>::Output: Integer, <Z0 as Add<D::J>>::Output: Integer,
§type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, usize>
type Output = Quantity<dyn Dimension<M = <Z0 as Add<<D as Dimension>::M>>::Output, Th = <Z0 as Add<<D as Dimension>::Th>>::Output, Kind = <D as Dimension>::Kind, J = <Z0 as Add<<D as Dimension>::J>>::Output, L = <Z0 as Add<<D as Dimension>::L>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, N = <Z0 as Add<<D as Dimension>::N>>::Output, I = <Z0 as Add<<D as Dimension>::I>>::Output> + 'static, U, usize>
*
operator.source§impl<Dl, Dr, Ul, Ur, V> Mul<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V>where
Dl: Dimension + ?Sized,
Dl::L: Add<Dr::L>,
<Dl::L as Add<Dr::L>>::Output: Integer,
Dl::M: Add<Dr::M>,
<Dl::M as Add<Dr::M>>::Output: Integer,
Dl::T: Add<Dr::T>,
<Dl::T as Add<Dr::T>>::Output: Integer,
Dl::I: Add<Dr::I>,
<Dl::I as Add<Dr::I>>::Output: Integer,
Dl::Th: Add<Dr::Th>,
<Dl::Th as Add<Dr::Th>>::Output: Integer,
Dl::N: Add<Dr::N>,
<Dl::N as Add<Dr::N>>::Output: Integer,
Dl::J: Add<Dr::J>,
<Dl::J as Add<Dr::J>>::Output: Integer,
Dl::Kind: Mul,
Dr: Dimension + ?Sized,
Dr::Kind: Mul,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + Mul<V>,
impl<Dl, Dr, Ul, Ur, V> Mul<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V>where Dl: Dimension + ?Sized, Dl::L: Add<Dr::L>, <Dl::L as Add<Dr::L>>::Output: Integer, Dl::M: Add<Dr::M>, <Dl::M as Add<Dr::M>>::Output: Integer, Dl::T: Add<Dr::T>, <Dl::T as Add<Dr::T>>::Output: Integer, Dl::I: Add<Dr::I>, <Dl::I as Add<Dr::I>>::Output: Integer, Dl::Th: Add<Dr::Th>, <Dl::Th as Add<Dr::Th>>::Output: Integer, Dl::N: Add<Dr::N>, <Dl::N as Add<Dr::N>>::Output: Integer, Dl::J: Add<Dr::J>, <Dl::J as Add<Dr::J>>::Output: Integer, Dl::Kind: Mul, Dr: Dimension + ?Sized, Dr::Kind: Mul, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + Mul<V>,
§type Output = Quantity<dyn Dimension<M = <<Dl as Dimension>::M as Add<<Dr as Dimension>::M>>::Output, Th = <<Dl as Dimension>::Th as Add<<Dr as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, J = <<Dl as Dimension>::J as Add<<Dr as Dimension>::J>>::Output, L = <<Dl as Dimension>::L as Add<<Dr as Dimension>::L>>::Output, T = <<Dl as Dimension>::T as Add<<Dr as Dimension>::T>>::Output, N = <<Dl as Dimension>::N as Add<<Dr as Dimension>::N>>::Output, I = <<Dl as Dimension>::I as Add<<Dr as Dimension>::I>>::Output> + 'static, Ul, V>
type Output = Quantity<dyn Dimension<M = <<Dl as Dimension>::M as Add<<Dr as Dimension>::M>>::Output, Th = <<Dl as Dimension>::Th as Add<<Dr as Dimension>::Th>>::Output, Kind = dyn Kind + 'static, J = <<Dl as Dimension>::J as Add<<Dr as Dimension>::J>>::Output, L = <<Dl as Dimension>::L as Add<<Dr as Dimension>::L>>::Output, T = <<Dl as Dimension>::T as Add<<Dr as Dimension>::T>>::Output, N = <<Dl as Dimension>::N as Add<<Dr as Dimension>::N>>::Output, I = <<Dl as Dimension>::I as Add<<Dr as Dimension>::I>>::Output> + 'static, Ul, V>
*
operator.source§impl<D, U, V> Mul<V> for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: Mul,
U: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, U, V> Mul<V> for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: Mul, U: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<D, U, V> MulAssign<V> for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: MulAssign,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + MulAssign<V>,
impl<D, U, V> MulAssign<V> for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: MulAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + MulAssign<V>,
source§fn mul_assign(&mut self, rhs: V)
fn mul_assign(&mut self, rhs: V)
*=
operation. Read moresource§impl<D, U, V> Neg for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: Neg,
U: Units<V> + ?Sized,
V: Signed + Conversion<V>,
impl<D, U, V> Neg for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: Neg, U: Units<V> + ?Sized, V: Signed + Conversion<V>,
source§impl<D, U, V> Ord for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Ord,
impl<D, U, V> Ord for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Ord,
source§impl<D, Ul, Ur, V> PartialEq<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, Ul, Ur, V> PartialEq<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<D, Ul, Ur, V> PartialOrd<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + PartialOrd,
impl<D, Ul, Ur, V> PartialOrd<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + PartialOrd,
source§fn le(&self, other: &Quantity<D, Ur, V>) -> bool
fn le(&self, other: &Quantity<D, Ur, V>) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<D, Ul, Ur, V> Rem<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
D::Kind: Rem,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, Ul, Ur, V> Rem<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, D::Kind: Rem, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<D, Ul, Ur, V> RemAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
D::Kind: RemAssign,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + RemAssign,
impl<D, Ul, Ur, V> RemAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, D::Kind: RemAssign, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + RemAssign,
source§fn rem_assign(&mut self, rhs: Quantity<D, Ur, V>)
fn rem_assign(&mut self, rhs: Quantity<D, Ur, V>)
%=
operation. Read moresource§impl<D, U, V> Saturating for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: Saturating,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Saturating,
impl<D, U, V> Saturating for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: Saturating, U: Units<V> + ?Sized, V: Num + Conversion<V> + Saturating,
source§fn saturating_add(self, v: Self) -> Self
fn saturating_add(self, v: Self) -> Self
source§fn saturating_sub(self, v: Self) -> Self
fn saturating_sub(self, v: Self) -> Self
source§impl<D, U, V> Serialize for Quantity<D, U, V>where
D: Dimension + ?Sized,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Serialize,
impl<D, U, V> Serialize for Quantity<D, U, V>where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Serialize,
source§impl<D, Ul, Ur, V> Sub<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
D::Kind: Sub,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<D, Ul, Ur, V> Sub<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, D::Kind: Sub, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<Ul, Ur, V> Sub<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V>,
impl<Ul, Ur, V> Sub<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V>,
source§impl<D, Ul, Ur, V> SubAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where
D: Dimension + ?Sized,
D::Kind: SubAssign,
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + SubAssign<V>,
impl<D, Ul, Ur, V> SubAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V>where D: Dimension + ?Sized, D::Kind: SubAssign, Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + SubAssign<V>,
source§fn sub_assign(&mut self, rhs: Quantity<D, Ur, V>)
fn sub_assign(&mut self, rhs: Quantity<D, Ur, V>)
-=
operation. Read moresource§impl<Ul, Ur, V> SubAssign<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where
Ul: Units<V> + ?Sized,
Ur: Units<V> + ?Sized,
V: Num + Conversion<V> + SubAssign<V>,
impl<Ul, Ur, V> SubAssign<Quantity<dyn Dimension<M = Z0, Th = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = Z0, N = Z0, I = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V>where Ul: Units<V> + ?Sized, Ur: Units<V> + ?Sized, V: Num + Conversion<V> + SubAssign<V>,
source§fn sub_assign(&mut self, rhs: TemperatureInterval<Ur, V>)
fn sub_assign(&mut self, rhs: TemperatureInterval<Ur, V>)
-=
operation. Read moresource§impl<D, U, V> Sum<Quantity<D, U, V>> for Quantity<D, U, V>where
D: Dimension + ?Sized,
D::Kind: Add,
U: Units<V> + ?Sized,
V: Num + Conversion<V> + Sum,
impl<D, U, V> Sum<Quantity<D, U, V>> for Quantity<D, U, V>where D: Dimension + ?Sized, D::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V> + Sum,
source§impl<U, V> TryFrom<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>> for Durationwhere
U: Units<V> + ?Sized,
V: Num + Conversion<V> + PartialOrd + ToPrimitive,
second: Conversion<V, T = V::T>,
nanosecond: Conversion<V, T = V::T>,
impl<U, V> TryFrom<Quantity<dyn Dimension<M = Z0, Th = Z0, Kind = dyn Kind + 'static, J = Z0, L = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0, I = Z0> + 'static, U, V>> for Durationwhere U: Units<V> + ?Sized, V: Num + Conversion<V> + PartialOrd + ToPrimitive, second: Conversion<V, T = V::T>, nanosecond: Conversion<V, T = V::T>,
Attempt to convert the given Time
to a Duration
.
For possible failure modes see TryFromError
.
Notes
The Duration
to Time
conversion is tested to be accurate to within 1 nanosecond (to allow
for floating point rounding error). If greater precision is needed, consider using a different
underlying storage type or avoiding the conversion altogether.