Struct icu::experimental::duration::DurationFormatterPreferences
source · #[non_exhaustive]pub struct DurationFormatterPreferences {
pub locale_prefs: LocalePreferences,
pub numbering_system: Option<NumberingSystem>,
}
Expand description
The preferences for duration 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 DurationFormatterPreferences
impl DurationFormatterPreferences
sourcepub fn extend(&mut self, other: DurationFormatterPreferences)
pub fn extend(&mut self, other: DurationFormatterPreferences)
Extends the preferences with the values from another set of preferences.
Trait Implementations§
source§impl Clone for DurationFormatterPreferences
impl Clone for DurationFormatterPreferences
source§fn clone(&self) -> DurationFormatterPreferences
fn clone(&self) -> DurationFormatterPreferences
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 DurationFormatterPreferences
impl Debug for DurationFormatterPreferences
source§impl Default for DurationFormatterPreferences
impl Default for DurationFormatterPreferences
source§fn default() -> DurationFormatterPreferences
fn default() -> DurationFormatterPreferences
Returns the “default value” for a type. Read more
source§impl From<&DurationFormatterPreferences> for FixedDecimalFormatterPreferences
impl From<&DurationFormatterPreferences> for FixedDecimalFormatterPreferences
source§fn from(
other: &DurationFormatterPreferences,
) -> FixedDecimalFormatterPreferences
fn from( other: &DurationFormatterPreferences, ) -> FixedDecimalFormatterPreferences
Converts to this type from the input type.
source§impl From<&DurationFormatterPreferences> for ListFormatterPreferences
impl From<&DurationFormatterPreferences> for ListFormatterPreferences
source§fn from(other: &DurationFormatterPreferences) -> ListFormatterPreferences
fn from(other: &DurationFormatterPreferences) -> ListFormatterPreferences
Converts to this type from the input type.
source§impl From<&DurationFormatterPreferences> for UnitsFormatterPreferences
impl From<&DurationFormatterPreferences> for UnitsFormatterPreferences
source§fn from(other: &DurationFormatterPreferences) -> UnitsFormatterPreferences
fn from(other: &DurationFormatterPreferences) -> UnitsFormatterPreferences
Converts to this type from the input type.
source§impl From<&LanguageIdentifier> for DurationFormatterPreferences
impl From<&LanguageIdentifier> for DurationFormatterPreferences
source§fn from(lid: &LanguageIdentifier) -> DurationFormatterPreferences
fn from(lid: &LanguageIdentifier) -> DurationFormatterPreferences
Converts to this type from the input type.
source§impl From<&Locale> for DurationFormatterPreferences
impl From<&Locale> for DurationFormatterPreferences
source§fn from(loc: &Locale) -> DurationFormatterPreferences
fn from(loc: &Locale) -> DurationFormatterPreferences
Converts to this type from the input type.
source§impl From<DurationFormatterPreferences> for Locale
impl From<DurationFormatterPreferences> for Locale
source§fn from(other: DurationFormatterPreferences) -> Locale
fn from(other: DurationFormatterPreferences) -> Locale
Converts to this type from the input type.
source§impl From<LanguageIdentifier> for DurationFormatterPreferences
impl From<LanguageIdentifier> for DurationFormatterPreferences
source§fn from(lid: LanguageIdentifier) -> DurationFormatterPreferences
fn from(lid: LanguageIdentifier) -> DurationFormatterPreferences
Converts to this type from the input type.
source§impl From<Locale> for DurationFormatterPreferences
impl From<Locale> for DurationFormatterPreferences
source§fn from(loc: Locale) -> DurationFormatterPreferences
fn from(loc: Locale) -> DurationFormatterPreferences
Converts to this type from the input type.
source§impl Hash for DurationFormatterPreferences
impl Hash for DurationFormatterPreferences
source§impl PartialEq for DurationFormatterPreferences
impl PartialEq for DurationFormatterPreferences
source§fn eq(&self, other: &DurationFormatterPreferences) -> bool
fn eq(&self, other: &DurationFormatterPreferences) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for DurationFormatterPreferences
impl Eq for DurationFormatterPreferences
impl StructuralPartialEq for DurationFormatterPreferences
Auto Trait Implementations§
impl Freeze for DurationFormatterPreferences
impl RefUnwindSafe for DurationFormatterPreferences
impl Send for DurationFormatterPreferences
impl Sync for DurationFormatterPreferences
impl Unpin for DurationFormatterPreferences
impl UnwindSafe for DurationFormatterPreferences
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