#[non_exhaustive]pub struct Weekday {
pub repr: WeekdayRepr,
pub one_indexed: bool,
pub case_sensitive: bool,
}use WeekdayShort, WeekdayLong, WeekdaySunday, or WeekdayMonday instead
cookies and (crate features formatting or parsing) only.Expand description
Day of the week.
Fields (Non-exhaustive)ยง
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.repr: WeekdayRepruse WeekdayShort, WeekdayLong, WeekdaySunday, or WeekdayMonday instead
What form of representation should be used?
one_indexed: booluse WeekdayShort, WeekdayLong, WeekdaySunday, or WeekdayMonday instead
When using a numerical representation, should it be zero or one-indexed?
case_sensitive: booluse WeekdayShort, WeekdayLong, WeekdaySunday, or WeekdayMonday instead
Is the value case sensitive when parsing?
Implementationsยง
Sourceยงimpl Weekday
impl Weekday
Sourcepub const fn default() -> Weekday
pub const fn default() -> Weekday
Creates a modifier that indicates the value uses the Long
representation and is case-sensitive when parsing. If the representation is changed to a
numerical one, the instance defaults to one-based indexing.
This function exists since Default::default() cannot be used in a const context.
It may be removed once that becomes possible. As the Default trait is in the
prelude, removing this function in the future will not cause any resolution failures for
the overwhelming majority of users; only users who use #![no_implicit_prelude] will be
affected. As such it will not be considered a breaking change.
Sourceยงimpl Weekday
impl Weekday
Sourcepub const fn with_repr(self, repr: WeekdayRepr) -> Weekday
pub const fn with_repr(self, repr: WeekdayRepr) -> Weekday
Set the manner in which the weekday is represented.
Sourcepub const fn with_one_indexed(self, one_indexed: bool) -> Weekday
pub const fn with_one_indexed(self, one_indexed: bool) -> Weekday
Set whether the value is one-indexed when using a numerical representation.
Sourcepub const fn with_case_sensitive(self, case_sensitive: bool) -> Weekday
pub const fn with_case_sensitive(self, case_sensitive: bool) -> Weekday
Set whether the value is case sensitive when parsing.
Trait Implementationsยง
impl Copy for Weekday
Sourceยงimpl Default for Weekday
Creates a modifier that indicates the value uses the Long
representation and is case-sensitive when parsing. If the representation is changed to a
numerical one, the instance defaults to one-based indexing.
impl Default for Weekday
Creates a modifier that indicates the value uses the Long
representation and is case-sensitive when parsing. If the representation is changed to a
numerical one, the instance defaults to one-based indexing.
impl Eq for Weekday
Sourceยงimpl PartialEq for Weekday
impl PartialEq for Weekday
impl StructuralPartialEq for Weekday
Auto Trait Implementationsยง
impl Freeze for Weekday
impl RefUnwindSafe for Weekday
impl Send for Weekday
impl Sync for Weekday
impl Unpin for Weekday
impl UnsafeUnpin for Weekday
impl UnwindSafe for Weekday
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.