#[non_exhaustive]pub struct CalendarPreferences {
pub locale_preferences: LocalePreferences,
pub calendar_algorithm: Option<CalendarAlgorithm>,
}
Expand description
The preferences for calendars 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_preferences: LocalePreferences
Locale Preferences for the Preferences structure.
calendar_algorithm: Option<CalendarAlgorithm>
The user’s preferred calendar system.
Implementations§
Source§impl CalendarPreferences
impl CalendarPreferences
Sourcepub fn extend(&mut self, other: CalendarPreferences)
pub fn extend(&mut self, other: CalendarPreferences)
Extends the preferences with the values from another set of preferences.
Trait Implementations§
Source§impl Clone for CalendarPreferences
impl Clone for CalendarPreferences
Source§fn clone(&self) -> CalendarPreferences
fn clone(&self) -> CalendarPreferences
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 CalendarPreferences
impl Debug for CalendarPreferences
Source§impl Default for CalendarPreferences
impl Default for CalendarPreferences
Source§fn default() -> CalendarPreferences
fn default() -> CalendarPreferences
Returns the “default value” for a type. Read more
Source§impl From<&DateTimeFormatterPreferences> for CalendarPreferences
impl From<&DateTimeFormatterPreferences> for CalendarPreferences
Source§fn from(other: &DateTimeFormatterPreferences) -> CalendarPreferences
fn from(other: &DateTimeFormatterPreferences) -> CalendarPreferences
Converts to this type from the input type.
Source§impl From<&LanguageIdentifier> for CalendarPreferences
impl From<&LanguageIdentifier> for CalendarPreferences
Source§fn from(lid: &LanguageIdentifier) -> CalendarPreferences
fn from(lid: &LanguageIdentifier) -> CalendarPreferences
Converts to this type from the input type.
Source§impl From<&Locale> for CalendarPreferences
impl From<&Locale> for CalendarPreferences
Source§fn from(loc: &Locale) -> CalendarPreferences
fn from(loc: &Locale) -> CalendarPreferences
Converts to this type from the input type.
Source§impl From<LanguageIdentifier> for CalendarPreferences
impl From<LanguageIdentifier> for CalendarPreferences
Source§fn from(lid: LanguageIdentifier) -> CalendarPreferences
fn from(lid: LanguageIdentifier) -> CalendarPreferences
Converts to this type from the input type.
Source§impl From<Locale> for CalendarPreferences
impl From<Locale> for CalendarPreferences
Source§fn from(loc: Locale) -> CalendarPreferences
fn from(loc: Locale) -> CalendarPreferences
Converts to this type from the input type.
Source§impl Hash for CalendarPreferences
impl Hash for CalendarPreferences
Source§impl PartialEq for CalendarPreferences
impl PartialEq for CalendarPreferences
impl Copy for CalendarPreferences
impl Eq for CalendarPreferences
impl StructuralPartialEq for CalendarPreferences
Auto Trait Implementations§
impl Freeze for CalendarPreferences
impl RefUnwindSafe for CalendarPreferences
impl Send for CalendarPreferences
impl Sync for CalendarPreferences
impl Unpin for CalendarPreferences
impl UnwindSafe for CalendarPreferences
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