Unit

Trait Unit 

Source
pub trait Unit<T = f64>: Sized {
    // Required methods
    fn from_units(val: T, units: Units) -> Self;
    fn to_units(&self, units: Units) -> T;
    fn base_unit(&self) -> T;
}

Required Methods§

Source

fn from_units(val: T, units: Units) -> Self

Source

fn to_units(&self, units: Units) -> T

Source

fn base_unit(&self) -> T

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.

Implementors§