Trait icu::experimental::units::convertible::Convertible
source · pub trait Convertible: Clone {
// Required methods
fn add_refs(&self, other: &Self) -> Self;
fn mul_refs(&self, other: &Self) -> Self;
fn from_ratio_bigint(ratio: Ratio<BigInt>) -> Option<Self>;
fn reciprocal(&self) -> Self;
}
Expand description
A trait for types that can be converted between two units.
Required Methods§
sourcefn mul_refs(&self, other: &Self) -> Self
fn mul_refs(&self, other: &Self) -> Self
Multiplies two values by reference, avoiding data cloning.
sourcefn from_ratio_bigint(ratio: Ratio<BigInt>) -> Option<Self>
fn from_ratio_bigint(ratio: Ratio<BigInt>) -> Option<Self>
Converts a Ratio<BigInt>
to the implementing type.
sourcefn reciprocal(&self) -> Self
fn reciprocal(&self) -> Self
Returns the reciprocal of the implementing type.
Object Safety§
This trait is not object safe.