Quantity

Struct Quantity 

Source
#[repr(transparent)]
pub struct Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V>,
{ pub dimension: PhantomData<D>, pub units: PhantomData<U>, pub value: V, }
Expand description

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

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

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

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

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

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

// error[E0277]: the trait bound `second: length::Unit` is not satisfied
let l = Length::new::<second>(1.0);

Mixing quantities will also cause a compile error:

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

§Generic Parameters

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

Fields§

§dimension: PhantomData<D>

Quantity dimension. See Dimension.

§units: PhantomData<U>

Quantity base units. See Units.

§value: V

Quantity value stored in the base units for the quantity.

Implementations§

Source§

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

Source

pub fn new<N>(v: V) -> Self
where N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

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

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

§Generic Parameters
  • N: Unit.
Source

pub fn floor<N>(self) -> Self
where 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.
Source

pub fn ceil<N>(self) -> Self
where 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.
Source

pub fn round<N>(self) -> Self
where 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.
Source

pub fn trunc<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn fract<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn format_args<N>(_unit: N, style: DisplayStyle) -> Arguments<Dimension, N>
where N: Unit,

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

§Notes

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

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

§Examples
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

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

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle, ) -> QuantityArguments<Dimension, U, V, N>
where N: Unit,

Creates a struct that formats self for display.

§Notes

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

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

§Examples
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

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

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

Source

pub fn new<N>(v: V) -> Self
where N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

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

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

§Generic Parameters
  • N: Unit.
Source

pub fn floor<N>(self) -> Self
where 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.
Source

pub fn ceil<N>(self) -> Self
where 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.
Source

pub fn round<N>(self) -> Self
where 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.
Source

pub fn trunc<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn fract<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn format_args<N>(_unit: N, style: DisplayStyle) -> Arguments<Dimension, N>
where N: Unit,

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

§Notes

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

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

§Examples
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

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

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle, ) -> QuantityArguments<Dimension, U, V, N>
where N: Unit,

Creates a struct that formats self for display.

§Notes

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

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

§Examples
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

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

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

Source

pub fn new<N>(v: V) -> Self
where N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

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

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

§Generic Parameters
  • N: Unit.
Source

pub fn floor<N>(self) -> Self
where 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.
Source

pub fn ceil<N>(self) -> Self
where 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.
Source

pub fn round<N>(self) -> Self
where 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.
Source

pub fn trunc<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn fract<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn format_args<N>(_unit: N, style: DisplayStyle) -> Arguments<Dimension, N>
where N: Unit,

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

§Notes

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

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

§Examples
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

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

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle, ) -> QuantityArguments<Dimension, U, V, N>
where N: Unit,

Creates a struct that formats self for display.

§Notes

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

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

§Examples
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

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

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

Source

pub fn new<N>(v: V) -> Self
where N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

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

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

§Generic Parameters
  • N: Unit.
Source

pub fn floor<N>(self) -> Self
where 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.
Source

pub fn ceil<N>(self) -> Self
where 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.
Source

pub fn round<N>(self) -> Self
where 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.
Source

pub fn trunc<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn fract<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn format_args<N>(_unit: N, style: DisplayStyle) -> Arguments<Dimension, N>
where N: Unit,

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

§Notes

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

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

§Examples
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

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

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle, ) -> QuantityArguments<Dimension, U, V, N>
where N: Unit,

Creates a struct that formats self for display.

§Notes

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

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

§Examples
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

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

impl<U, V> Quantity<dyn Dimension<Kind = dyn Kind, M = Z0, T = Z0, C = Z0>, U, V>
where U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source

pub fn new<N>(v: V) -> Self
where N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

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

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

§Generic Parameters
  • N: Unit.
Source

pub fn floor<N>(self) -> Self
where 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.
Source

pub fn ceil<N>(self) -> Self
where 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.
Source

pub fn round<N>(self) -> Self
where 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.
Source

pub fn trunc<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn fract<N>(self) -> Self
where V: Float, N: Unit + Conversion<V, T = V::T>,

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

§Generic Parameters
  • N: Unit.
Source

pub fn format_args<N>(_unit: N, style: DisplayStyle) -> Arguments<Dimension, N>
where N: Unit,

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

§Notes

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

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

§Examples
let t1 = Time::new::<femtosecond>(1.0_E-1);
let t2 = Time::new::<picosecond>(1.0_E-1);
let a = Time::format_args(femtosecond, Description);

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

pub fn into_format_args<N>( self, _unit: N, style: DisplayStyle, ) -> QuantityArguments<Dimension, U, V, N>
where N: Unit,

Creates a struct that formats self for display.

§Notes

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

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

§Examples
let t = Time::new::<picosecond>(1.0_E-1);
let a = t.into_format_args(femtosecond, Description);

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

impl<D, U> Quantity<D, U, f64>
where D: Dimension + ?Sized, U: Units<f64> + ?Sized,

Source

pub fn is_nan(self) -> bool

Returns true if this value is NAN and false otherwise.

Source

pub fn is_infinite(self) -> bool

Returns true if this value is positive infinity or negative infinity and false otherwise.

Source

pub fn is_finite(self) -> bool

Returns true if this number is neither infinite nor NAN.

Source

pub fn is_normal(self) -> bool

Returns true if the number is neither zero, infinite, subnormal, or NAN.

Source§

impl<D, U, V> Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source

pub fn classify(self) -> FpCategory
where V: Float,

Returns the floating point category of the number. If only one property is going to be tested, it is generally faster to use the specific predicate instead.

Source

pub fn abs(self) -> Self
where V: Signed,

Computes the absolute value of self. Returns NAN if the quantity is NAN.

Source

pub fn signum(self) -> Self
where V: Signed,

Returns a quantity that represents the sign of self.

  • 1.0 of the base unit if the number is positive, +0.0, or INFINITY.
  • -1.0 of the base unit if the number is negative, -0.0, or NEG_INFINITY.
  • NAN if the number is NAN.
Source

pub fn is_sign_positive(self) -> bool
where V: Float,

Returns true if self’s sign bit is positive, including +0.0 and INFINITY.

Source

pub fn is_sign_negative(self) -> bool
where V: Float,

Returns true if self’s sign is negative, including -0.0 and NEG_INFINITY.

Source

pub fn recip( self, ) -> Quantity<Q<Negate<D::M>, Negate<D::C>, Negate<D::T>>, U, V>
where D::M: Neg, <D::M as Neg>::Output: Integer, D::C: Neg, <D::C as Neg>::Output: Integer, D::T: Neg, <D::T 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();
Source

pub fn max(self, other: Self) -> Self
where V: Float,

Returns the maximum of the two quantities.

Source

pub fn min(self, other: Self) -> Self
where V: Float,

Returns the minimum of the two quantities.

Source§

impl Quantity<dyn Dimension<Kind = dyn Kind, M = Z0, T = Z0, C = PInt<UInt<UTerm, B1>>>, dyn Units<usize, charge = e, time = s, mass = dalton>, usize>

Source

pub fn to_float(self) -> Charge

Convert a usize charge to f64 for computations

Source§

impl Quantity<dyn Dimension<Kind = dyn Kind, M = Z0, T = Z0, C = PInt<UInt<UTerm, B1>>>, dyn Units<isize, charge = e, time = s, mass = dalton>, isize>

Source

pub fn to_float(self) -> Charge

Convert an isize charge to f64 for computations

Source§

impl Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = NInt<UInt<UTerm, B1>>>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>

Source

pub fn ppm(self, b: Self) -> Ratio

Absolute ppm error between this mz and the given other

Source

pub fn signed_ppm(self, b: Self) -> Ratio

Signed ppm error between this mz and the given other

Source§

impl Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>

Source

pub fn ppm(self, b: Self) -> Ratio

Absolute ppm error between this mass and the given other

Source

pub fn signed_ppm(self, b: Self) -> Ratio

Signed ppm error between this mass and the given other

Trait Implementations§

Source§

impl<D, U, V> Add for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

type Output = Quantity<D, U, V>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<D, U, V> AddAssign for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: AddAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + AddAssign<V>,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<D, U, V> Clone for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D, U, V> ConstZero for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + ConstZero,

Source§

const ZERO: Self

Constant representing the zero value.
Source§

impl<D, U, V> Debug for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D, U, V> Default for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de, D, U, V> Deserialize<'de> for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Deserialize<'de>,

Source§

fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>
where De: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<D, U> Div<Quantity<D, U, f64>> for f64
where D: Dimension + ?Sized, D::Kind: Div, U: Units<f64> + ?Sized, Z0: Sub<D::M> + Sub<D::C> + Sub<D::T>, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::C>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer,

Source§

type Output = Quantity<dyn Dimension<Kind = <D as Dimension>::Kind, M = <Z0 as Sub<<D as Dimension>::M>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, C = <Z0 as Sub<<D as Dimension>::C>>::Output>, U, f64>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Quantity<D, U, f64>) -> Self::Output

Performs the / operation. Read more
Source§

impl<D, U> Div<Quantity<D, U, isize>> for isize
where D: Dimension + ?Sized, D::Kind: Div, U: Units<isize> + ?Sized, Z0: Sub<D::M> + Sub<D::C> + Sub<D::T>, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::C>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer,

Source§

type Output = Quantity<dyn Dimension<Kind = <D as Dimension>::Kind, M = <Z0 as Sub<<D as Dimension>::M>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, C = <Z0 as Sub<<D as Dimension>::C>>::Output>, U, isize>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Quantity<D, U, isize>) -> Self::Output

Performs the / operation. Read more
Source§

impl<D, U> Div<Quantity<D, U, usize>> for usize
where D: Dimension + ?Sized, D::Kind: Div, U: Units<usize> + ?Sized, Z0: Sub<D::M> + Sub<D::C> + Sub<D::T>, <Z0 as Sub<D::M>>::Output: Integer, <Z0 as Sub<D::C>>::Output: Integer, <Z0 as Sub<D::T>>::Output: Integer,

Source§

type Output = Quantity<dyn Dimension<Kind = <D as Dimension>::Kind, M = <Z0 as Sub<<D as Dimension>::M>>::Output, T = <Z0 as Sub<<D as Dimension>::T>>::Output, C = <Z0 as Sub<<D as Dimension>::C>>::Output>, U, usize>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Quantity<D, U, usize>) -> Self::Output

Performs the / operation. Read more
Source§

impl<Dl, Dr, U, V> Div<Quantity<Dr, U, V>> for Quantity<Dl, U, V>
where Dl: Dimension + ?Sized, Dl::M: Sub<Dr::M>, <Dl::M as Sub<Dr::M>>::Output: Integer, Dl::C: Sub<Dr::C>, <Dl::C as Sub<Dr::C>>::Output: Integer, Dl::T: Sub<Dr::T>, <Dl::T as Sub<Dr::T>>::Output: Integer, Dl::Kind: Div, Dr: Dimension + ?Sized, Dr::Kind: Div, U: Units<V> + ?Sized, V: Num + Conversion<V> + Div<V>,

Source§

type Output = Quantity<dyn Dimension<Kind = dyn Kind, M = <<Dl as Dimension>::M as Sub<<Dr as Dimension>::M>>::Output, T = <<Dl as Dimension>::T as Sub<<Dr as Dimension>::T>>::Output, C = <<Dl as Dimension>::C as Sub<<Dr as Dimension>::C>>::Output>, U, V>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Quantity<Dr, U, V>) -> Self::Output

Performs the / operation. Read more
Source§

impl<D, U, V> Div<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Div, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

type Output = Quantity<D, U, V>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: V) -> Self::Output

Performs the / operation. Read more
Source§

impl<D, U, V> DivAssign<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: DivAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + DivAssign<V>,

Source§

fn div_assign(&mut self, rhs: V)

Performs the /= operation. Read more
Source§

impl From<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = NInt<UInt<UTerm, B1>>>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for OrderedMassOverCharge

Source§

fn from(value: MassOverCharge) -> Self

Converts to this type from the input type.
Source§

impl From<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for OrderedMass

Source§

fn from(value: Mass) -> Self

Converts to this type from the input type.
Source§

impl From<Quantity<dyn Dimension<Kind = dyn Kind, M = Z0, T = PInt<UInt<UTerm, B1>>, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for OrderedTime

Source§

fn from(value: Time) -> Self

Converts to this type from the input type.
Source§

impl From<Quantity<dyn Dimension<Kind = dyn Kind, M = Z0, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for OrderedRatio

Source§

fn from(value: Ratio) -> Self

Converts to this type from the input type.
Source§

impl<D, U, V> Hash for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Hash,

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<D, U> Mul<Quantity<D, U, f64>> for f64
where D: Dimension + ?Sized, D::Kind: Mul, U: Units<f64> + ?Sized, Z0: Add<D::M> + Add<D::C> + Add<D::T>, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::C>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer,

Source§

type Output = Quantity<dyn Dimension<Kind = <D as Dimension>::Kind, M = <Z0 as Add<<D as Dimension>::M>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, C = <Z0 as Add<<D as Dimension>::C>>::Output>, U, f64>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Quantity<D, U, f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl<D, U> Mul<Quantity<D, U, isize>> for isize
where D: Dimension + ?Sized, D::Kind: Mul, U: Units<isize> + ?Sized, Z0: Add<D::M> + Add<D::C> + Add<D::T>, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::C>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer,

Source§

type Output = Quantity<dyn Dimension<Kind = <D as Dimension>::Kind, M = <Z0 as Add<<D as Dimension>::M>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, C = <Z0 as Add<<D as Dimension>::C>>::Output>, U, isize>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Quantity<D, U, isize>) -> Self::Output

Performs the * operation. Read more
Source§

impl<D, U> Mul<Quantity<D, U, usize>> for usize
where D: Dimension + ?Sized, D::Kind: Mul, U: Units<usize> + ?Sized, Z0: Add<D::M> + Add<D::C> + Add<D::T>, <Z0 as Add<D::M>>::Output: Integer, <Z0 as Add<D::C>>::Output: Integer, <Z0 as Add<D::T>>::Output: Integer,

Source§

type Output = Quantity<dyn Dimension<Kind = <D as Dimension>::Kind, M = <Z0 as Add<<D as Dimension>::M>>::Output, T = <Z0 as Add<<D as Dimension>::T>>::Output, C = <Z0 as Add<<D as Dimension>::C>>::Output>, U, usize>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Quantity<D, U, usize>) -> Self::Output

Performs the * operation. Read more
Source§

impl<Dl, Dr, U, V> Mul<Quantity<Dr, U, V>> for Quantity<Dl, U, V>
where Dl: Dimension + ?Sized, Dl::M: Add<Dr::M>, <Dl::M as Add<Dr::M>>::Output: Integer, Dl::C: Add<Dr::C>, <Dl::C as Add<Dr::C>>::Output: Integer, Dl::T: Add<Dr::T>, <Dl::T as Add<Dr::T>>::Output: Integer, Dl::Kind: Mul, Dr: Dimension + ?Sized, Dr::Kind: Mul, U: Units<V> + ?Sized, V: Num + Conversion<V> + Mul<V>,

Source§

type Output = Quantity<dyn Dimension<Kind = dyn Kind, M = <<Dl as Dimension>::M as Add<<Dr as Dimension>::M>>::Output, T = <<Dl as Dimension>::T as Add<<Dr as Dimension>::T>>::Output, C = <<Dl as Dimension>::C as Add<<Dr as Dimension>::C>>::Output>, U, V>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Quantity<Dr, U, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<D, U, V> Mul<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Mul, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

type Output = Quantity<D, U, V>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: V) -> Self::Output

Performs the * operation. Read more
Source§

impl<D, U, V> MulAssign<V> for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: MulAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + MulAssign<V>,

Source§

fn mul_assign(&mut self, rhs: V)

Performs the *= operation. Read more
Source§

impl<D, U, V> Neg for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Neg, U: Units<V> + ?Sized, V: Signed + Conversion<V>,

Source§

type Output = Quantity<D, U, V>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<D, U, V> Ord for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Ord,

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

fn max(self, other: Self) -> Self

Compares and returns the maximum of two values. Read more
Source§

fn min(self, other: Self) -> Self

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<D, U, V> PartialEq for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<D, U, V> PartialOrd for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + PartialOrd,

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &Self) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn le(&self, other: &Self) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn gt(&self, other: &Self) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

fn ge(&self, other: &Self) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<D, U, V> Rem for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Rem, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

type Output = Quantity<D, U, V>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<D, U, V> RemAssign for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: RemAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + RemAssign,

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<D, U, V> Saturating for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Saturating, U: Units<V> + ?Sized, V: Num + Conversion<V> + Saturating,

Source§

fn saturating_add(self, v: Self) -> Self

Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing.
Source§

fn saturating_sub(self, v: Self) -> Self

Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing.
Source§

impl<D, U, V> Serialize for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Serialize,

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<D, U, V> Sub for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Sub, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

type Output = Quantity<D, U, V>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<D, U, V> SubAssign for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: SubAssign, U: Units<V> + ?Sized, V: Num + Conversion<V> + SubAssign<V>,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<D, U, V> Sum for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V> + Sum,

Source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = Self>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl WithinTolerance<Multi<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>>, Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for Tolerance<OrderedMass>

Source§

fn within(&self, a: &Multi<Mass>, b: &Mass) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl WithinTolerance<Multi<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>>, Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for Tolerance<Mass>

Source§

fn within(&self, a: &Multi<Mass>, b: &Mass) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl WithinTolerance<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = NInt<UInt<UTerm, B1>>>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = NInt<UInt<UTerm, B1>>>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for Tolerance<MassOverCharge>

Source§

fn within(&self, a: &MassOverCharge, b: &MassOverCharge) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl WithinTolerance<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>, Multi<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>>> for Tolerance<OrderedMass>

Source§

fn within(&self, a: &Mass, b: &Multi<Mass>) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl WithinTolerance<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>, Multi<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>>> for Tolerance<Mass>

Source§

fn within(&self, a: &Mass, b: &Multi<Mass>) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl WithinTolerance<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for Tolerance<OrderedMass>

Source§

fn within(&self, a: &Mass, b: &Mass) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl WithinTolerance<Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, M = PInt<UInt<UTerm, B1>>, T = Z0, C = Z0>, dyn Units<f64, charge = e, time = s, mass = dalton>, f64>> for Tolerance<Mass>

Source§

fn within(&self, a: &Mass, b: &Mass) -> bool

Check if two values are within the specified tolerance from each other.
Source§

impl<D, U, V> Zero for Quantity<D, U, V>
where D: Dimension + ?Sized, D::Kind: Add, U: Units<V> + ?Sized, V: Num + Conversion<V>,

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<D, U, V> Copy for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Copy,

Source§

impl<D, U, V> Eq for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + Eq,

Auto Trait Implementations§

§

impl<D, U, V> Freeze for Quantity<D, U, V>
where V: Freeze, D: ?Sized, U: ?Sized,

§

impl<D, U, V> RefUnwindSafe for Quantity<D, U, V>

§

impl<D, U, V> Send for Quantity<D, U, V>
where V: Send, D: ?Sized, U: ?Sized,

§

impl<D, U, V> Sync for Quantity<D, U, V>
where V: Sync, D: ?Sized, U: ?Sized,

§

impl<D, U, V> Unpin for Quantity<D, U, V>
where V: Unpin, D: ?Sized, U: ?Sized,

§

impl<D, U, V> UnwindSafe for Quantity<D, U, V>
where V: UnwindSafe, D: UnwindSafe + ?Sized, U: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsOut<T> for T
where T: Copy,

Source§

fn as_out(&mut self) -> Out<'_, T>

Returns an out reference to self.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HighestOf<T> for T

Source§

type HighestLevel = T

This is the highest complexity level out of Self and the type parameter
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> AtLeast<T> for T

Source§

impl<T> AtMax<T> for T

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,