Trait quantity::Unit[][src]

pub trait Unit: Copy + PartialEq + Div<Output = Self> + Mul<Output = Self> + DivAssign + MulAssign + Display {
    const DIMENSIONLESS: Self;

    fn powi(&self, i: i32) -> Self;
fn sqrt(&self) -> Result<Self, QuantityError>;
fn cbrt(&self) -> Result<Self, QuantityError>;
fn root(&self, i: i32) -> Result<Self, QuantityError>; fn is_dimensionless(&self) -> bool { ... } }
Expand description

A generalized unit.

Associated Constants

The value of Self that corresponds to a dimensionless property.

Required methods

Calculate the integer power of self.

Try to calculate the square root of self.

Try to calculate the cubic root of self.

Try to calculate the integer root of self.

Provided methods

Returns true if self is dimensionless and false otherwise.

Implementors