Trait dimensioned::traits::Dimensioned [] [src]

pub trait Dimensioned {
    type Value;
    type Units;
    fn new(val: Self::Value) -> Self;
    fn value_unsafe(&self) -> &Self::Value;
}

Allows one to refer to quantities generically.

It is not recommened to implement this for anything outside this this crate.

Associated Types

The type of the value of a quantity. E.g. For si::Meter<f64>, Value is f64.

The units of a quanitity. This will be a type-array of type-numbers. E.g. For si::Meter<f64>, Units is tarr![P1, Z0, Z0, Z0, Z0, Z0, Z0].

Required Methods

Construct a new quantity.

Extract the value from a quantity. As this ignores the units completely, it is dimensionally unsafe.

Implementors