Struct icu::experimental::units::converter::UnitsConverter
source · pub struct UnitsConverter<N>(/* private fields */)
where
N: Convertible;
Expand description
A converter for converting between two single or compound units.
For example:
1 - meter
to foot
2 - mile-per-gallon
to liter-per-100-kilometer
.
3 - celsius
to fahrenheit
.
NOTE: This converter does not support conversions between mixed units, for example, from “meter” to “foot-and-inch”.
Implementations§
source§impl<N> UnitsConverter<N>where
N: Convertible,
impl<N> UnitsConverter<N>where
N: Convertible,
Trait Implementations§
source§impl<N> Clone for UnitsConverter<N>where
N: Clone + Convertible,
impl<N> Clone for UnitsConverter<N>where
N: Clone + Convertible,
source§fn clone(&self) -> UnitsConverter<N>
fn clone(&self) -> UnitsConverter<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<N> Freeze for UnitsConverter<N>where
N: Freeze,
impl<N> RefUnwindSafe for UnitsConverter<N>where
N: RefUnwindSafe,
impl<N> Send for UnitsConverter<N>where
N: Send,
impl<N> Sync for UnitsConverter<N>where
N: Sync,
impl<N> Unpin for UnitsConverter<N>where
N: Unpin,
impl<N> UnwindSafe for UnitsConverter<N>where
N: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more