pub enum Weekday {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
}Expand description
Day of the week. Default is set to Sunday.
Variants§
Implementations§
Source§impl Weekday
impl Weekday
Sourcepub const fn from_sunday_zero_offset(n: i8) -> Option<Self>
pub const fn from_sunday_zero_offset(n: i8) -> Option<Self>
Converts a Sunday-based weekday number (0 = Sunday … 6 = Saturday) to Weekday.
Sourcepub const fn from_monday_one_offset(n: i8) -> Option<Self>
pub const fn from_monday_one_offset(n: i8) -> Option<Self>
Converts a Monday-based weekday number (1 = Monday … 7 = Sunday) to Weekday.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Weekday
impl<'de> Deserialize<'de> for Weekday
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Tsify for Weekday
impl Tsify for Weekday
const DECL: &'static str = "/**\n * Day of the week. Default is set to Sunday.\n */\nexport type Weekday = \"Sunday\" | \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\" | \"Saturday\";"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
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 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
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<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
Compare self to
key and return true if they are equal.