Skip to main content

ReferenceSystem

Trait ReferenceSystem 

Source
pub trait ReferenceSystem {
    type Inner;

    const T: i8;
    const L: i8;
    const M: i8;
    const I: i8;
    const THETA: i8;
    const N: i8;
    const J: i8;
    const FACTOR: f64 = _;

    // Required methods
    fn from_reduced(value: Self::Inner) -> Self
       where Self::Inner: Mul<f64, Output = Self::Inner>;
    fn to_reduced(&self) -> Self::Inner
       where for<'a> &'a Self::Inner: Div<f64, Output = Self::Inner>;
    fn into_reduced(self) -> Self::Inner
       where Self::Inner: Div<f64, Output = Self::Inner>;
}
Expand description

Conversion between reduced units and SI units.

Required Associated Constants§

Source

const T: i8

Source

const L: i8

Source

const M: i8

Source

const I: i8

Source

const THETA: i8

Source

const N: i8

Source

const J: i8

Provided Associated Constants§

Source

const FACTOR: f64 = _

Required Associated Types§

Required Methods§

Source

fn from_reduced(value: Self::Inner) -> Self
where Self::Inner: Mul<f64, Output = Self::Inner>,

Source

fn to_reduced(&self) -> Self::Inner
where for<'a> &'a Self::Inner: Div<f64, Output = Self::Inner>,

Source

fn into_reduced(self) -> Self::Inner
where Self::Inner: Div<f64, Output = Self::Inner>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<Inner, const T: i8, const L: i8, const M: i8, const I: i8, const THETA: i8, const N: i8, const J: i8> ReferenceSystem for Quantity<Inner, SIUnit<T, L, M, I, THETA, N, J>>

Conversion to and from reduced units

Source§

const T: i8 = T

Source§

const L: i8 = L

Source§

const M: i8 = M

Source§

const I: i8 = I

Source§

const THETA: i8 = THETA

Source§

const N: i8 = N

Source§

const J: i8 = J

Source§

type Inner = Inner

Source§

fn from_reduced(value: Inner) -> Self
where Inner: Mul<f64, Output = Inner>,

Source§

fn to_reduced(&self) -> Inner
where for<'a> &'a Inner: Div<f64, Output = Inner>,

Source§

fn into_reduced(self) -> Inner
where Inner: Div<f64, Output = Inner>,

Implementors§