Trait uom::ConversionFactor

source ·
pub trait ConversionFactor<V>: PartialOrd + Add<Self, Output = Self> + Sub<Self, Output = Self> + Mul<Self, Output = Self> + Div<Self, Output = Self> + Zero + One {
    // Required methods
    fn powi(self, e: i32) -> Self;
    fn value(self) -> V;
}
Expand description

Trait representing a conversion factor.

§Generic Parameters

  • V: Underlying storage type trait is implemented for.

Required Methods§

source

fn powi(self, e: i32) -> Self

Raises a ConversionFactor<V> to an integer power.

source

fn value(self) -> V

Converts a ConversionFactor<V> into its underlying storage type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ConversionFactor<u8> for Ratio<u8>

source§

fn powi(self, e: i32) -> Self

source§

fn value(self) -> u8

source§

impl ConversionFactor<u16> for Ratio<u16>

source§

fn powi(self, e: i32) -> Self

source§

fn value(self) -> u16

source§

impl ConversionFactor<u32> for Ratio<u32>

source§

fn powi(self, e: i32) -> Self

source§

fn value(self) -> u32

Implementors§