[][src]Struct uom::si::fmt::Arguments

pub struct Arguments<D: ?Sized, N> where
    D: Dimension,
    N: Unit
{ /* fields omitted */ }

A struct to specify a display style and unit.

Usage

Indirect style

let l = Length::new::<meter>(1.0);
let a = Length::format_args(centimeter, Description);

assert_eq!("100 centimeters", format!("{}", a.with(l)));

Direct style

let l = Length::new::<meter>(1.0);
let a = l.into_format_args(centimeter, Description);

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

Methods

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Acceleration<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: AmountOfSubstance<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Area<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: AvailableEnergy<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Capacitance<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Density<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: ElectricalResistance<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: ElectricalConductance<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: ElectricCharge<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: ElectricCurrent<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: ElectricPotential<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Energy<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Force<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Frequency<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Inductance<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Length<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Luminance<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: LuminousIntensity<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: MagneticFlux<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: MagneticFluxDensity<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Mass<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: MassRate<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Power<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Pressure<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Ratio<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: TemperatureInterval<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: ThermodynamicTemperature<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Time<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Velocity<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: Volume<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

impl<N> Arguments<Dimension, N> where
    N: Unit + Unit
[src]

pub fn with<U: ?Sized, V>(
    self,
    quantity: VolumeRate<U, V>
) -> QuantityArguments<Dimension, U, V, N> where
    U: Units<V>,
    V: Num + Conversion<V>, 
[src]

Specifies a quantity to display.

Trait Implementations

impl<D: ?Sized, N> Copy for Arguments<D, N> where
    D: Dimension,
    N: Unit
[src]

impl<D: ?Sized, N> Clone for Arguments<D, N> where
    D: Dimension,
    N: Unit
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<D: ?Sized, N> Send for Arguments<D, N> where
    N: Send

impl<D: ?Sized, N> Sync for Arguments<D, N> where
    N: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T
[src]

type Output = T

Should always be Self