Skip to main content

ReferenceSystem

Trait ReferenceSystem 

Source
pub trait ReferenceSystem {
    type Inner;
    type T: Integer;
    type L: Integer;
    type M: Integer;
    type I: Integer;
    type THETA: Integer;
    type N: Integer;
    type J: Integer;

    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.

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, T: Integer, L: Integer, M: Integer, I: Integer, THETA: Integer, N: Integer, J: Integer> ReferenceSystem for Quantity<Inner, SIUnit<T, L, M, I, THETA, N, J>>

Conversion to and from reduced units

Source§

type Inner = Inner

Source§

type T = T

Source§

type L = L

Source§

type M = M

Source§

type I = I

Source§

type THETA = THETA

Source§

type N = N

Source§

type J = J

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§