#[non_exhaustive]pub struct WeekInformation {
pub first_weekday: Weekday,
pub weekend: WeekdaySet,
}Expand description
Information about the first day of the week and the weekend.
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.first_weekday: WeekdayThe first day of a week.
weekend: WeekdaySetThe set of weekend days
Implementations§
Source§impl WeekInformation
impl WeekInformation
Sourcepub fn try_new(prefs: WeekPreferences) -> Result<Self, DataError>
pub fn try_new(prefs: WeekPreferences) -> Result<Self, DataError>
Creates a new WeekCalculator from compiled data.
✨ Enabled with the compiled_data Cargo feature.
Sourcepub fn try_new_unstable<P>(
provider: &P,
prefs: WeekPreferences,
) -> Result<Self, DataError>
pub fn try_new_unstable<P>( provider: &P, prefs: WeekPreferences, ) -> Result<Self, DataError>
A version of Self::try_new that uses custom data provided by a DataProvider.
⚠️ The bounds on provider may change over time, including in SemVer minor releases.
Sourcepub fn weekend(self) -> WeekdaySetIterator ⓘ
pub fn weekend(self) -> WeekdaySetIterator ⓘ
Weekdays that are part of the ‘weekend’, for calendar purposes. Days may not be contiguous, and order is based off the first weekday.
Trait Implementations§
Source§impl Clone for WeekInformation
impl Clone for WeekInformation
Source§fn clone(&self) -> WeekInformation
fn clone(&self) -> WeekInformation
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 WeekInformation
impl Debug for WeekInformation
impl Copy for WeekInformation
Auto Trait Implementations§
impl Freeze for WeekInformation
impl RefUnwindSafe for WeekInformation
impl Send for WeekInformation
impl Sync for WeekInformation
impl Unpin for WeekInformation
impl UnsafeUnpin for WeekInformation
impl UnwindSafe for WeekInformation
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