QuantityTrait

Trait QuantityTrait 

Source
pub trait QuantityTrait:
    Clone
    + Debug
    + FromStr {
    // Required methods
    fn type_id() -> Cow<'static, str>;
    fn si_value(&self) -> f64;

    // Provided methods
    fn description() -> Cow<'static, str> { ... }
    fn name() -> Cow<'static, str> { ... }
}

Required Methods§

Source

fn type_id() -> Cow<'static, str>

Source

fn si_value(&self) -> f64

Provided Methods§

Source

fn description() -> Cow<'static, str>

Source

fn name() -> Cow<'static, str>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl QuantityTrait for Area

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for DiffusionCoefficient

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for Length

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for Mass

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for MolarMass

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for Pressure

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for ThermodynamicTemperature

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for Time

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Source§

impl QuantityTrait for Velocity

Source§

fn si_value(&self) -> f64

Source§

fn type_id() -> Cow<'static, str>

Source§

impl QuantityTrait for Volume

Source§

fn type_id() -> Cow<'static, str>

Source§

fn si_value(&self) -> f64

Implementors§