pub enum Weekday {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
}Expand description
A named day of the week.
Variants§
Implementations§
Source§impl Weekday
impl Weekday
Sourcepub fn from_zero(weekday: i8) -> Result<Self, Error>
pub fn from_zero(weekday: i8) -> Result<Self, Error>
Return the weekday based on a number, with Sunday as Day 0, Monday as Day 1, and so on.
use datetime::Weekday;
assert_eq!(Weekday::from_zero(4), Ok(Weekday::Thursday));
assert!(Weekday::from_zero(7).is_err());pub fn from_one(weekday: i8) -> Result<Self, Error>
Trait Implementations§
impl Copy for Weekday
impl Eq 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 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
Mutably borrows from an owned value. Read more