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