#[non_exhaustive]pub struct UnitsFormatterPreferences {
pub locale_prefs: LocalePreferences,
pub numbering_system: Option<NumberingSystem>,
}
Expand description
The preferences for units formatting.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.locale_prefs: LocalePreferences
Locale Preferences for the Preferences structure.
numbering_system: Option<NumberingSystem>
The user’s preferred numbering system.
Corresponds to the -u-nu
in Unicode Locale Identifier.
Implementations§
source§impl UnitsFormatterPreferences
impl UnitsFormatterPreferences
sourcepub fn extend(&mut self, other: UnitsFormatterPreferences)
pub fn extend(&mut self, other: UnitsFormatterPreferences)
Extends the preferences with the values from another set of preferences.
Trait Implementations§
source§impl Clone for UnitsFormatterPreferences
impl Clone for UnitsFormatterPreferences
source§fn clone(&self) -> UnitsFormatterPreferences
fn clone(&self) -> UnitsFormatterPreferences
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 UnitsFormatterPreferences
impl Debug for UnitsFormatterPreferences
source§impl Default for UnitsFormatterPreferences
impl Default for UnitsFormatterPreferences
source§fn default() -> UnitsFormatterPreferences
fn default() -> UnitsFormatterPreferences
Returns the “default value” for a type. Read more
source§impl From<&DurationFormatterPreferences> for UnitsFormatterPreferences
impl From<&DurationFormatterPreferences> for UnitsFormatterPreferences
source§fn from(other: &DurationFormatterPreferences) -> Self
fn from(other: &DurationFormatterPreferences) -> Self
Converts to this type from the input type.
source§impl From<&LanguageIdentifier> for UnitsFormatterPreferences
impl From<&LanguageIdentifier> for UnitsFormatterPreferences
source§impl From<&Locale> for UnitsFormatterPreferences
impl From<&Locale> for UnitsFormatterPreferences
source§impl From<&UnitsFormatterPreferences> for FixedDecimalFormatterPreferences
impl From<&UnitsFormatterPreferences> for FixedDecimalFormatterPreferences
source§fn from(other: &UnitsFormatterPreferences) -> Self
fn from(other: &UnitsFormatterPreferences) -> Self
Converts to this type from the input type.
source§impl From<&UnitsFormatterPreferences> for PluralRulesPreferences
impl From<&UnitsFormatterPreferences> for PluralRulesPreferences
source§fn from(other: &UnitsFormatterPreferences) -> Self
fn from(other: &UnitsFormatterPreferences) -> Self
Converts to this type from the input type.
source§impl From<LanguageIdentifier> for UnitsFormatterPreferences
impl From<LanguageIdentifier> for UnitsFormatterPreferences
source§impl From<Locale> for UnitsFormatterPreferences
impl From<Locale> for UnitsFormatterPreferences
source§impl From<UnitsFormatterPreferences> for Locale
impl From<UnitsFormatterPreferences> for Locale
source§fn from(other: UnitsFormatterPreferences) -> Self
fn from(other: UnitsFormatterPreferences) -> Self
Converts to this type from the input type.
source§impl Hash for UnitsFormatterPreferences
impl Hash for UnitsFormatterPreferences
impl Copy for UnitsFormatterPreferences
impl Eq for UnitsFormatterPreferences
impl StructuralPartialEq for UnitsFormatterPreferences
Auto Trait Implementations§
impl Freeze for UnitsFormatterPreferences
impl RefUnwindSafe for UnitsFormatterPreferences
impl Send for UnitsFormatterPreferences
impl Sync for UnitsFormatterPreferences
impl Unpin for UnitsFormatterPreferences
impl UnwindSafe for UnitsFormatterPreferences
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