#[non_exhaustive]pub struct WeekPreferences {
pub locale_preferences: LocalePreferences,
pub first_weekday: Option<FirstDay>,
}Expand description
The preferences for the week information.
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: LocalePreferencesLocale Preferences for the Preferences structure.
first_weekday: Option<FirstDay>The first day of the week
Implementations§
Source§impl WeekPreferences
impl WeekPreferences
Sourcepub fn extend(&mut self, other: WeekPreferences)
pub fn extend(&mut self, other: WeekPreferences)
Extends the preferences with the values from another set of preferences.
Sourcepub fn from_locale_strict(loc: &Locale) -> Result<Self, Self>
pub fn from_locale_strict(loc: &Locale) -> Result<Self, Self>
Construct a WeekPreferences from a Locale
Returns Err if any of of the preference values are invalid.
Trait Implementations§
Source§impl Clone for WeekPreferences
impl Clone for WeekPreferences
Source§fn clone(&self) -> WeekPreferences
fn clone(&self) -> WeekPreferences
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WeekPreferences
impl Debug for WeekPreferences
Source§impl Default for WeekPreferences
impl Default for WeekPreferences
Source§fn default() -> WeekPreferences
fn default() -> WeekPreferences
Returns the “default value” for a type. Read more
Source§impl From<&LanguageIdentifier> for WeekPreferences
impl From<&LanguageIdentifier> for WeekPreferences
Source§fn from(lid: &LanguageIdentifier) -> Self
fn from(lid: &LanguageIdentifier) -> Self
Converts to this type from the input type.
Source§impl From<&Locale> for WeekPreferences
impl From<&Locale> for WeekPreferences
Source§impl From<LanguageIdentifier> for WeekPreferences
impl From<LanguageIdentifier> for WeekPreferences
Source§fn from(lid: LanguageIdentifier) -> Self
fn from(lid: LanguageIdentifier) -> Self
Converts to this type from the input type.
Source§impl From<Locale> for WeekPreferences
impl From<Locale> for WeekPreferences
Source§impl Hash for WeekPreferences
impl Hash for WeekPreferences
Source§impl PartialEq for WeekPreferences
impl PartialEq for WeekPreferences
Source§fn eq(&self, other: &WeekPreferences) -> bool
fn eq(&self, other: &WeekPreferences) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for WeekPreferences
impl Eq for WeekPreferences
impl StructuralPartialEq for WeekPreferences
Auto Trait Implementations§
impl Freeze for WeekPreferences
impl RefUnwindSafe for WeekPreferences
impl Send for WeekPreferences
impl Sync for WeekPreferences
impl Unpin for WeekPreferences
impl UnsafeUnpin for WeekPreferences
impl UnwindSafe for WeekPreferences
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