[−][src]Struct uom::si::Quantity
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
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V>
[src]
pub const HALF_TURN: Self
[src]
A half turn, i.e. an angle with a value of π as measured in radians
pub const FULL_TURN: Self
[src]
A full turn, i.e. an angle with a value of 2π as measured in radians
impl Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V>
[src]
pub const HALF_TURN: Self
[src]
A half turn, i.e. an angle with a value of π as measured in radians
pub const FULL_TURN: Self
[src]
A full turn, i.e. an angle with a value of 2π as measured in radians
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, Th = Z0, T = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn ConstituentConcentrationKind + 'static, I = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = NInt<UInt<UTerm, B1>>, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, Th = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = PInt<UInt<UTerm, B1>>, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = PInt<UInt<UInt<UTerm, B1>, B0>>, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = NInt<UInt<UTerm, B1>>, Th = Z0, T = PInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = NInt<UInt<UInt<UTerm, B1>, B0>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn InformationKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn InformationKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, I = Z0, L = NInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = PInt<UInt<UTerm, B1>>, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = NInt<UInt<UTerm, B1>>, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = NInt<UInt<UTerm, B1>>, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn ConstituentConcentrationKind + 'static, I = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn ConstituentConcentrationKind + 'static, I = Z0, L = NInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, Th = Z0, T = Z0, N = PInt<UInt<UTerm, B1>>> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = NInt<UInt<UTerm, B1>>> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = Z0, N = NInt<UInt<UTerm, B1>>> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = NInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = Z0, Th = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn SolidAngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl Quantity<dyn Dimension<J = Z0, Kind = dyn SolidAngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V>
[src]
pub const SPHERE: Self
[src]
The solid angle subtended by a sphere at its center, i.e. with a value 4π as measured in steradians.
impl Quantity<dyn Dimension<J = Z0, Kind = dyn SolidAngleKind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V>
[src]
pub const SPHERE: Self
[src]
The solid angle subtended by a sphere at its center, i.e. with a value 4π as measured in steradians.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = PInt<UInt<UTerm, B1>>, Th = NInt<UInt<UTerm, B1>>, T = NInt<UInt<UInt<UTerm, B1>, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn TemperatureKind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = PInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn AngleKind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, M = PInt<UInt<UTerm, B1>>, Th = Z0, T = NInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UTerm, B1>>, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<U: ?Sized, V> Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = PInt<UInt<UInt<UTerm, B1>, B1>>, M = Z0, Th = Z0, T = NInt<UInt<UTerm, B1>>, N = Z0> + 'static, U, V> where
U: Units<V>,
V: Num + Conversion<V>,
[src]
U: Units<V>,
V: Num + Conversion<V>,
pub fn new<N>(v: V) -> Self where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn get<N>(&self) -> V where
N: Unit + Conversion<V, T = V::T>,
[src]
N: Unit + Conversion<V, T = V::T>,
pub fn floor<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn ceil<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn round<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
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.
pub fn trunc<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn fract<N>(self) -> Self where
V: Float,
N: Unit + Conversion<V, T = V::T>,
[src]
V: Float,
N: Unit + Conversion<V, T = V::T>,
pub fn format_args<N>(unit: N, style: DisplayStyle) -> Arguments<Dimension, N> where
N: Unit,
[src]
N: Unit,
Creates a struct that can be used to format a compatible quantity for display.
Notes
The return value of this method cannot be used to print directly, but is instead used to format quantities and can be reused; see Arguments::with and the examples below.
If you do not need to format multiple quantities, consider using
into_format_args
instead.
Examples
let t1 = Time::new::<femtosecond>(1.0_E-1); let t2 = Time::new::<picosecond>(1.0_E-1); let a = Time::format_args(femtosecond, Description); assert_eq!("0.1 femtoseconds", format!("{}", a.with(t1))); assert_eq!("100 femtoseconds", format!("{}", a.with(t2)));
Generic Parameters
N
: Unit.
pub fn into_format_args<N>(
self,
unit: N,
style: DisplayStyle
) -> QuantityArguments<Dimension, U, V, N> where
N: Unit,
[src]
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.
impl<D: ?Sized, U: ?Sized, V> Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V>,
pub fn is_nan(self) -> bool where
V: Float,
[src]
V: Float,
Returns true
if this value is NAN
and false
otherwise.
pub fn is_infinite(self) -> bool where
V: Float,
[src]
V: Float,
Returns true
if this value is positive infinity or negative infinity and
false
otherwise.
pub fn is_finite(self) -> bool where
V: Float,
[src]
V: Float,
Returns true
if this number is neither infinite nor NAN
.
pub fn is_normal(self) -> bool where
V: Float,
[src]
V: Float,
Returns true
if the number is neither zero, infinite, subnormal, or NAN
.
pub fn classify(self) -> FpCategory where
V: Float,
[src]
V: Float,
Returns the floating point category of the number. If only one property is going to be tested, it is generally faster to use the specific predicate instead.
pub fn abs(self) -> Self where
V: Signed,
[src]
V: Signed,
Computes the absolute value of self
. Returns NAN
if the quantity is
NAN
.
pub fn signum(self) -> Self where
V: Signed,
[src]
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
.
pub fn is_sign_positive(self) -> bool where
V: Float,
[src]
V: Float,
Returns true
if self
's sign bit is positive, including +0.0
and
INFINITY
.
pub fn is_sign_negative(self) -> bool where
V: Float,
[src]
V: Float,
Returns true
if self
's sign is negative, including -0.0
and
NEG_INFINITY
.
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,
[src]
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();
pub fn max(self, other: Self) -> Self where
V: Float,
[src]
V: Float,
Returns the maximum of the two quantities.
pub fn min(self, other: Self) -> Self where
V: Float,
[src]
V: Float,
Returns the minimum of the two quantities.
Trait Implementations
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Add<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
D::Kind: Add,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
D::Kind: Add,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
type Output = Quantity<D, Ul, V>
The resulting type after applying the +
operator.
fn add(self, rhs: Quantity<D, Ur, V>) -> Self::Output
[src]
impl<Ul: ?Sized, Ur: ?Sized, V> Add<Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V> where
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
type Output = ThermodynamicTemperature<Ul, V>
The resulting type after applying the +
operator.
fn add(self, rhs: TemperatureInterval<Ur, V>) -> Self::Output
[src]
impl<Ul: ?Sized, Ur: ?Sized, V> Add<Quantity<dyn Dimension<J = Z0, Kind = dyn TemperatureKind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, Ur, V>> for TemperatureInterval<Ul, V> where
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
type Output = ThermodynamicTemperature<Ul, V>
The resulting type after applying the +
operator.
fn add(self, rhs: ThermodynamicTemperature<Ur, V>) -> Self::Output
[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> AddAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
D::Kind: AddAssign,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + AddAssign<V>,
[src]
D: Dimension,
D::Kind: AddAssign,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + AddAssign<V>,
fn add_assign(&mut self, rhs: Quantity<D, Ur, V>)
[src]
impl<Ul: ?Sized, Ur: ?Sized, V> AddAssign<Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V> where
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + AddAssign<V>,
[src]
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + AddAssign<V>,
fn add_assign(&mut self, rhs: TemperatureInterval<Ur, V>)
[src]
impl<D: ?Sized, U: ?Sized, V> Clone for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Clone,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<D: ?Sized, U: ?Sized, V> Copy for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Copy,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Copy,
impl<D: ?Sized, U: ?Sized, V> Debug for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Debug,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Debug,
impl<D: ?Sized, U: ?Sized, V> Default for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Default,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Default,
impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, f32>> for f32 where
D: Dimension,
D::Kind: Div,
U: Units<f32>,
Z0: Sub<D::L>,
<Z0 as Sub<D::L>>::Output: Integer,
Z0: Sub<D::M>,
<Z0 as Sub<D::M>>::Output: Integer,
Z0: Sub<D::T>,
<Z0 as Sub<D::T>>::Output: Integer,
Z0: Sub<D::I>,
<Z0 as Sub<D::I>>::Output: Integer,
Z0: Sub<D::Th>,
<Z0 as Sub<D::Th>>::Output: Integer,
Z0: Sub<D::N>,
<Z0 as Sub<D::N>>::Output: Integer,
Z0: Sub<D::J>,
<Z0 as Sub<D::J>>::Output: Integer,
[src]
D: Dimension,
D::Kind: Div,
U: Units<f32>,
Z0: Sub<D::L>,
<Z0 as Sub<D::L>>::Output: Integer,
Z0: Sub<D::M>,
<Z0 as Sub<D::M>>::Output: Integer,
Z0: Sub<D::T>,
<Z0 as Sub<D::T>>::Output: Integer,
Z0: Sub<D::I>,
<Z0 as Sub<D::I>>::Output: Integer,
Z0: Sub<D::Th>,
<Z0 as Sub<D::Th>>::Output: Integer,
Z0: Sub<D::N>,
<Z0 as Sub<D::N>>::Output: Integer,
Z0: Sub<D::J>,
<Z0 as Sub<D::J>>::Output: Integer,
type Output = Quantity<ISQ<Diff<Z0, D::L>, Diff<Z0, D::M>, Diff<Z0, D::T>, Diff<Z0, D::I>, Diff<Z0, D::Th>, Diff<Z0, D::N>, Diff<Z0, D::J>, D::Kind>, U, f32>
The resulting type after applying the /
operator.
fn div(self, rhs: Quantity<D, U, f32>) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized> Div<Quantity<D, U, f64>> for f64 where
D: Dimension,
D::Kind: Div,
U: Units<f64>,
Z0: Sub<D::L>,
<Z0 as Sub<D::L>>::Output: Integer,
Z0: Sub<D::M>,
<Z0 as Sub<D::M>>::Output: Integer,
Z0: Sub<D::T>,
<Z0 as Sub<D::T>>::Output: Integer,
Z0: Sub<D::I>,
<Z0 as Sub<D::I>>::Output: Integer,
Z0: Sub<D::Th>,
<Z0 as Sub<D::Th>>::Output: Integer,
Z0: Sub<D::N>,
<Z0 as Sub<D::N>>::Output: Integer,
Z0: Sub<D::J>,
<Z0 as Sub<D::J>>::Output: Integer,
[src]
D: Dimension,
D::Kind: Div,
U: Units<f64>,
Z0: Sub<D::L>,
<Z0 as Sub<D::L>>::Output: Integer,
Z0: Sub<D::M>,
<Z0 as Sub<D::M>>::Output: Integer,
Z0: Sub<D::T>,
<Z0 as Sub<D::T>>::Output: Integer,
Z0: Sub<D::I>,
<Z0 as Sub<D::I>>::Output: Integer,
Z0: Sub<D::Th>,
<Z0 as Sub<D::Th>>::Output: Integer,
Z0: Sub<D::N>,
<Z0 as Sub<D::N>>::Output: Integer,
Z0: Sub<D::J>,
<Z0 as Sub<D::J>>::Output: Integer,
type Output = Quantity<ISQ<Diff<Z0, D::L>, Diff<Z0, D::M>, Diff<Z0, D::T>, Diff<Z0, D::I>, Diff<Z0, D::Th>, Diff<Z0, D::N>, Diff<Z0, D::J>, D::Kind>, U, f64>
The resulting type after applying the /
operator.
fn div(self, rhs: Quantity<D, U, f64>) -> Self::Output
[src]
impl<Dl: ?Sized, Dr: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Div<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V> where
Dl: Dimension,
Dl::L: Sub<Dr::L>,
<Dl::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,
Dr::Kind: Div,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + Div<V>,
[src]
Dl: Dimension,
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,
Dr::Kind: Div,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + Div<V>,
type Output = Quantity<ISQ<Diff<Dl::L, Dr::L>, Diff<Dl::M, Dr::M>, Diff<Dl::T, Dr::T>, Diff<Dl::I, Dr::I>, Diff<Dl::Th, Dr::Th>, Diff<Dl::N, Dr::N>, Diff<Dl::J, Dr::J>>, Ul, V>
The resulting type after applying the /
operator.
fn div(self, rhs: Quantity<Dr, Ur, V>) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized, V> Div<V> for Quantity<D, U, V> where
D: Dimension,
D::Kind: Div,
U: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
D::Kind: Div,
U: Units<V>,
V: Num + Conversion<V>,
type Output = Quantity<D, U, V>
The resulting type after applying the /
operator.
fn div(self, rhs: V) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized, V> DivAssign<V> for Quantity<D, U, V> where
D: Dimension,
D::Kind: DivAssign,
U: Units<V>,
V: Num + Conversion<V> + DivAssign<V>,
[src]
D: Dimension,
D::Kind: DivAssign,
U: Units<V>,
V: Num + Conversion<V> + DivAssign<V>,
fn div_assign(&mut self, rhs: V)
[src]
impl<D: ?Sized, U: ?Sized, V> Eq for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Eq,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Eq,
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn AngleKind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn AngleKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn AngleKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn ConstituentConcentrationKind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn ConstituentConcentrationKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn ConstituentConcentrationKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn InformationKind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn InformationKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn InformationKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn Kind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn AngleKind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn AngleKind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn Kind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn SolidAngleKind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn SolidAngleKind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn Kind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn InformationKind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn InformationKind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn Kind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn ConstituentConcentrationKind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn ConstituentConcentrationKind>, Ul, V>
impl<L, M, T, I, Th, N, J, Ul: ?Sized, Ur: ?Sized, V> From<Quantity<dyn Dimension<J = J, Kind = dyn SolidAngleKind + 'static, I = I, L = L, M = M, Th = Th, T = T, N = N> + '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>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
L: Integer,
M: Integer,
T: Integer,
I: Integer,
Th: Integer,
N: Integer,
J: Integer,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn from(
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn SolidAngleKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
[src]
val: Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn SolidAngleKind>, Ur, V>
) -> Quantity<dyn Dimension<L = L, M = M, T = T, I = I, Th = Th, N = N, J = J, Kind = dyn Kind>, Ul, V>
impl<U: ?Sized> From<Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, f32>> for f32 where
U: Units<f32>,
f32: Num + Conversion<f32>,
[src]
U: Units<f32>,
f32: Num + Conversion<f32>,
impl<U: ?Sized> From<Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = Z0, T = Z0, N = Z0> + 'static, U, f64>> for f64 where
U: Units<f64>,
f64: Num + Conversion<f64>,
[src]
U: Units<f64>,
f64: Num + Conversion<f64>,
impl<D: ?Sized, U: ?Sized, V> Hash for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Hash,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, f32>> for f32 where
D: Dimension,
D::Kind: Mul,
U: Units<f32>,
Z0: Add<D::L>,
<Z0 as Add<D::L>>::Output: Integer,
Z0: Add<D::M>,
<Z0 as Add<D::M>>::Output: Integer,
Z0: Add<D::T>,
<Z0 as Add<D::T>>::Output: Integer,
Z0: Add<D::I>,
<Z0 as Add<D::I>>::Output: Integer,
Z0: Add<D::Th>,
<Z0 as Add<D::Th>>::Output: Integer,
Z0: Add<D::N>,
<Z0 as Add<D::N>>::Output: Integer,
Z0: Add<D::J>,
<Z0 as Add<D::J>>::Output: Integer,
[src]
D: Dimension,
D::Kind: Mul,
U: Units<f32>,
Z0: Add<D::L>,
<Z0 as Add<D::L>>::Output: Integer,
Z0: Add<D::M>,
<Z0 as Add<D::M>>::Output: Integer,
Z0: Add<D::T>,
<Z0 as Add<D::T>>::Output: Integer,
Z0: Add<D::I>,
<Z0 as Add<D::I>>::Output: Integer,
Z0: Add<D::Th>,
<Z0 as Add<D::Th>>::Output: Integer,
Z0: Add<D::N>,
<Z0 as Add<D::N>>::Output: Integer,
Z0: Add<D::J>,
<Z0 as Add<D::J>>::Output: Integer,
type Output = Quantity<ISQ<Sum<Z0, D::L>, Sum<Z0, D::M>, Sum<Z0, D::T>, Sum<Z0, D::I>, Sum<Z0, D::Th>, Sum<Z0, D::N>, Sum<Z0, D::J>, D::Kind>, U, f32>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quantity<D, U, f32>) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized> Mul<Quantity<D, U, f64>> for f64 where
D: Dimension,
D::Kind: Mul,
U: Units<f64>,
Z0: Add<D::L>,
<Z0 as Add<D::L>>::Output: Integer,
Z0: Add<D::M>,
<Z0 as Add<D::M>>::Output: Integer,
Z0: Add<D::T>,
<Z0 as Add<D::T>>::Output: Integer,
Z0: Add<D::I>,
<Z0 as Add<D::I>>::Output: Integer,
Z0: Add<D::Th>,
<Z0 as Add<D::Th>>::Output: Integer,
Z0: Add<D::N>,
<Z0 as Add<D::N>>::Output: Integer,
Z0: Add<D::J>,
<Z0 as Add<D::J>>::Output: Integer,
[src]
D: Dimension,
D::Kind: Mul,
U: Units<f64>,
Z0: Add<D::L>,
<Z0 as Add<D::L>>::Output: Integer,
Z0: Add<D::M>,
<Z0 as Add<D::M>>::Output: Integer,
Z0: Add<D::T>,
<Z0 as Add<D::T>>::Output: Integer,
Z0: Add<D::I>,
<Z0 as Add<D::I>>::Output: Integer,
Z0: Add<D::Th>,
<Z0 as Add<D::Th>>::Output: Integer,
Z0: Add<D::N>,
<Z0 as Add<D::N>>::Output: Integer,
Z0: Add<D::J>,
<Z0 as Add<D::J>>::Output: Integer,
type Output = Quantity<ISQ<Sum<Z0, D::L>, Sum<Z0, D::M>, Sum<Z0, D::T>, Sum<Z0, D::I>, Sum<Z0, D::Th>, Sum<Z0, D::N>, Sum<Z0, D::J>, D::Kind>, U, f64>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quantity<D, U, f64>) -> Self::Output
[src]
impl<Dl: ?Sized, Dr: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Mul<Quantity<Dr, Ur, V>> for Quantity<Dl, Ul, V> where
Dl: Dimension,
Dl::L: Add<Dr::L>,
<Dl::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,
Dr::Kind: Mul,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + Mul<V>,
[src]
Dl: Dimension,
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,
Dr::Kind: Mul,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + Mul<V>,
type Output = Quantity<ISQ<Sum<Dl::L, Dr::L>, Sum<Dl::M, Dr::M>, Sum<Dl::T, Dr::T>, Sum<Dl::I, Dr::I>, Sum<Dl::Th, Dr::Th>, Sum<Dl::N, Dr::N>, Sum<Dl::J, Dr::J>>, Ul, V>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quantity<Dr, Ur, V>) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized, V> Mul<V> for Quantity<D, U, V> where
D: Dimension,
D::Kind: Mul,
U: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
D::Kind: Mul,
U: Units<V>,
V: Num + Conversion<V>,
type Output = Quantity<D, U, V>
The resulting type after applying the *
operator.
fn mul(self, rhs: V) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized, V> MulAssign<V> for Quantity<D, U, V> where
D: Dimension,
D::Kind: MulAssign,
U: Units<V>,
V: Num + Conversion<V> + MulAssign<V>,
[src]
D: Dimension,
D::Kind: MulAssign,
U: Units<V>,
V: Num + Conversion<V> + MulAssign<V>,
fn mul_assign(&mut self, rhs: V)
[src]
impl<D: ?Sized, U: ?Sized, V> Neg for Quantity<D, U, V> where
D: Dimension,
D::Kind: Neg,
U: Units<V>,
V: Signed + Conversion<V>,
[src]
D: Dimension,
D::Kind: Neg,
U: Units<V>,
V: Signed + Conversion<V>,
type Output = Quantity<D, U, V>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<D: ?Sized, U: ?Sized, V> Ord for Quantity<D, U, V> where
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Ord,
[src]
D: Dimension,
U: Units<V>,
V: Num + Conversion<V> + Ord,
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> PartialEq<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
fn eq(&self, other: &Quantity<D, Ur, V>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> PartialOrd<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + PartialOrd,
[src]
D: Dimension,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + PartialOrd,
fn partial_cmp(&self, other: &Quantity<D, Ur, V>) -> Option<Ordering>
[src]
fn lt(&self, other: &Quantity<D, Ur, V>) -> bool
[src]
fn le(&self, other: &Quantity<D, Ur, V>) -> bool
[src]
fn gt(&self, other: &Quantity<D, Ur, V>) -> bool
[src]
fn ge(&self, other: &Quantity<D, Ur, V>) -> bool
[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Rem<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
D::Kind: Rem,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
D::Kind: Rem,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
type Output = Quantity<D, Ul, V>
The resulting type after applying the %
operator.
fn rem(self, rhs: Quantity<D, Ur, V>) -> Self::Output
[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> RemAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
D::Kind: RemAssign,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + RemAssign,
[src]
D: Dimension,
D::Kind: RemAssign,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + RemAssign,
fn rem_assign(&mut self, rhs: Quantity<D, Ur, V>)
[src]
impl<D: ?Sized, U: ?Sized, V> Saturating for Quantity<D, U, V> where
D: Dimension,
D::Kind: Saturating,
U: Units<V>,
V: Num + Conversion<V> + Saturating,
[src]
D: Dimension,
D::Kind: Saturating,
U: Units<V>,
V: Num + Conversion<V> + Saturating,
fn saturating_add(self, v: Self) -> Self
[src]
fn saturating_sub(self, v: Self) -> Self
[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> Sub<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
D::Kind: Sub,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
D::Kind: Sub,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
type Output = Quantity<D, Ul, V>
The resulting type after applying the -
operator.
fn sub(self, rhs: Quantity<D, Ur, V>) -> Self::Output
[src]
impl<Ul: ?Sized, Ur: ?Sized, V> Sub<Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V> where
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
[src]
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V>,
type Output = ThermodynamicTemperature<Ul, V>
The resulting type after applying the -
operator.
fn sub(self, rhs: TemperatureInterval<Ur, V>) -> Self::Output
[src]
impl<D: ?Sized, Ul: ?Sized, Ur: ?Sized, V> SubAssign<Quantity<D, Ur, V>> for Quantity<D, Ul, V> where
D: Dimension,
D::Kind: SubAssign,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + SubAssign<V>,
[src]
D: Dimension,
D::Kind: SubAssign,
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + SubAssign<V>,
fn sub_assign(&mut self, rhs: Quantity<D, Ur, V>)
[src]
impl<Ul: ?Sized, Ur: ?Sized, V> SubAssign<Quantity<dyn Dimension<J = Z0, Kind = dyn Kind + 'static, I = Z0, L = Z0, M = Z0, Th = PInt<UInt<UTerm, B1>>, T = Z0, N = Z0> + 'static, Ur, V>> for ThermodynamicTemperature<Ul, V> where
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + SubAssign<V>,
[src]
Ul: Units<V>,
Ur: Units<V>,
V: Num + Conversion<V> + SubAssign<V>,
fn sub_assign(&mut self, rhs: TemperatureInterval<Ur, V>)
[src]
impl<D: ?Sized, U: ?Sized, V> Sum<Quantity<D, U, V>> for Quantity<D, U, V> where
D: Dimension,
D::Kind: Add,
U: Units<V>,
V: Num + Conversion<V> + Sum,
[src]
D: Dimension,
D::Kind: Add,
U: Units<V>,
V: Num + Conversion<V> + Sum,
impl<D: ?Sized, U: ?Sized, V> Zero for Quantity<D, U, V> where
D: Dimension,
D::Kind: Add,
U: Units<V>,
V: Num + Conversion<V>,
[src]
D: Dimension,
D::Kind: Add,
U: Units<V>,
V: Num + Conversion<V>,
Auto Trait Implementations
impl<D: ?Sized, U: ?Sized, V> RefUnwindSafe for Quantity<D, U, V> where
D: RefUnwindSafe,
U: RefUnwindSafe,
V: RefUnwindSafe,
D: RefUnwindSafe,
U: RefUnwindSafe,
V: RefUnwindSafe,
impl<D: ?Sized, U: ?Sized, V> Send for Quantity<D, U, V> where
V: Send,
V: Send,
impl<D: ?Sized, U: ?Sized, V> Sync for Quantity<D, U, V> where
V: Sync,
V: Sync,
impl<D: ?Sized, U: ?Sized, V> Unpin for Quantity<D, U, V> where
V: Unpin,
V: Unpin,
impl<D: ?Sized, U: ?Sized, V> UnwindSafe for Quantity<D, U, V> where
D: UnwindSafe,
U: UnwindSafe,
V: UnwindSafe,
D: UnwindSafe,
U: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,