#[non_exhaustive]pub enum MeasurementSystem {
    Metric,
    USSystem,
    UKSystem,
}Expand description
A Unicode Measurement System Identifier defines a preferred measurement system.
Specifying “ms” in a locale identifier overrides the default value specified by supplemental measurement system data for the region
The valid values are listed in LDML.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Metric
Metric System
USSystem
US System of measurement: feet, pints, etc.; pints are 16oz
UKSystem
UK System of measurement: feet, pints, etc.; pints are 20oz
Implementations§
Trait Implementations§
Source§impl Clone for MeasurementSystem
 
impl Clone for MeasurementSystem
Source§fn clone(&self) -> MeasurementSystem
 
fn clone(&self) -> MeasurementSystem
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 moreSource§impl Debug for MeasurementSystem
 
impl Debug for MeasurementSystem
Source§impl From<MeasurementSystem> for Value
 
impl From<MeasurementSystem> for Value
Source§fn from(input: MeasurementSystem) -> Value
 
fn from(input: MeasurementSystem) -> Value
Converts to this type from the input type.
Source§impl Hash for MeasurementSystem
 
impl Hash for MeasurementSystem
Source§impl PartialEq for MeasurementSystem
 
impl PartialEq for MeasurementSystem
Source§impl PreferenceKey for MeasurementSystem
 
impl PreferenceKey for MeasurementSystem
Source§fn unicode_extension_key() -> Option<Key>
 
fn unicode_extension_key() -> Option<Key>
Retrieve unicode extension key corresponding to a given preference.
Source§fn try_from_key_value(
    key: &Key,
    value: &Value,
) -> Result<Option<Self>, PreferencesParseError>
 
fn try_from_key_value( key: &Key, value: &Value, ) -> Result<Option<Self>, PreferencesParseError>
Optional constructor of the given preference. It takes the
unicode extension key and if the key matches it attemptes to construct
the preference based on the given value.
If the value is not a valid value for the given key, the constructor throws.
Source§fn unicode_extension_value(&self) -> Option<Value>
 
fn unicode_extension_value(&self) -> Option<Value>
Retrieve unicode extension value corresponding to the given instance of the preference.
Source§impl TryFrom<&Value> for MeasurementSystem
 
impl TryFrom<&Value> for MeasurementSystem
impl Copy for MeasurementSystem
impl Eq for MeasurementSystem
impl StructuralPartialEq for MeasurementSystem
Auto Trait Implementations§
impl Freeze for MeasurementSystem
impl RefUnwindSafe for MeasurementSystem
impl Send for MeasurementSystem
impl Sync for MeasurementSystem
impl Unpin for MeasurementSystem
impl UnwindSafe for MeasurementSystem
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§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