Trait figures::UnscaledUnit

source ·
pub trait UnscaledUnit {
    type Representation: CastInto<i32>;

    // Required methods
    fn from_unscaled(unscaled: Self::Representation) -> Self;
    fn into_unscaled(self) -> Self::Representation;
}
Expand description

Information about scaling for a numerical unit type.

Required Associated Types§

source

type Representation: CastInto<i32>

The internal reprsentation used by this type.

Required Methods§

source

fn from_unscaled(unscaled: Self::Representation) -> Self

Returns a new instance using the unscaled representation.

source

fn into_unscaled(self) -> Self::Representation

Returns the inner, unscaled representation of this value.

Object Safety§

This trait is not object safe.

Implementors§