MeasurementUnit

Trait MeasurementUnit 

Source
pub trait MeasurementUnit {
    type Property: MeasurementProperty;

    const RATIO: f64;
    const OFFSET: f64;
    const SUFFIX: &'static str;
}

Required Associated Constants§

Source

const RATIO: f64

Source

const OFFSET: f64

Source

const SUFFIX: &'static str

Required Associated Types§

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§

Source§

impl MeasurementUnit for Radian

Source§

const RATIO: f64 = 1f64

Source§

const OFFSET: f64 = 0f64

Source§

const SUFFIX: &'static str = " rad"

Source§

type Property = Angle

Source§

impl MeasurementUnit for One

Source§

const RATIO: f64 = 1f64

Source§

const OFFSET: f64 = 0f64

Source§

const SUFFIX: &'static str = ""

Source§

type Property = Dimensionless