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.

Implementations on Foreign Types§

source§

impl ConversionFactor<f32> for f32

source§

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

source§

fn value(self) -> f32

source§

impl ConversionFactor<f64> for f64

source§

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

source§

fn value(self) -> f64

source§

impl ConversionFactor<usize> for Ratio<usize>

source§

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

source§

fn value(self) -> usize

source§

impl ConversionFactor<u32> for Ratio<u32>

source§

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

source§

fn value(self) -> u32

source§

impl ConversionFactor<u64> for Ratio<u64>

source§

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

source§

fn value(self) -> u64

source§

impl ConversionFactor<isize> for Ratio<isize>

source§

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

source§

fn value(self) -> isize

source§

impl ConversionFactor<i32> for Ratio<i32>

source§

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

source§

fn value(self) -> i32

source§

impl ConversionFactor<i64> for Ratio<i64>

source§

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

source§

fn value(self) -> i64

source§

impl ConversionFactor<BigInt> for Ratio<BigInt>

source§

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

source§

fn value(self) -> BigInt

source§

impl ConversionFactor<BigUint> for Ratio<BigUint>

source§

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

source§

fn value(self) -> BigUint

source§

impl ConversionFactor<Ratio<i32>> for Rational32

source§

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

source§

fn value(self) -> Rational32

source§

impl ConversionFactor<Ratio<i64>> for Rational64

source§

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

source§

fn value(self) -> Rational64

source§

impl ConversionFactor<Ratio<BigInt>> for BigRational

source§

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

source§

fn value(self) -> BigRational

Implementors§