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§
sourcetype Representation: CastInto<i32>
type Representation: CastInto<i32>
The internal reprsentation used by this type.
Required Methods§
sourcefn from_unscaled(unscaled: Self::Representation) -> Self
fn from_unscaled(unscaled: Self::Representation) -> Self
Returns a new instance using the unscaled representation.
sourcefn into_unscaled(self) -> Self::Representation
fn into_unscaled(self) -> Self::Representation
Returns the inner, unscaled representation of this value.
Object Safety§
This trait is not object safe.