pub struct UtcDateTime { /* private fields */ }Expand description
Decomposed UTC date and time components for cron matching and iteration.
Implementations§
Source§impl UtcDateTime
Construction and conversion methods for UtcDateTime.
impl UtcDateTime
Construction and conversion methods for UtcDateTime.
Sourcepub const fn from_unix_secs(secs: i64) -> Self
pub const fn from_unix_secs(secs: i64) -> Self
Decomposes Unix epoch seconds into a UtcDateTime.
§Arguments
i64- Signed Unix timestamp in seconds.
§Returns
Self- Decomposed UTC civil date and time.
Sourcepub const fn to_unix_secs(self) -> i64
pub const fn to_unix_secs(self) -> i64
Converts this UtcDateTime back to Unix epoch seconds.
§Returns
i64- Signed Unix timestamp in seconds.
Sourcepub const fn get_weekday(self) -> u8
pub const fn get_weekday(self) -> u8
Sourcepub const fn get_minute(self) -> u8
pub const fn get_minute(self) -> u8
Sourcepub const fn get_second(self) -> u8
pub const fn get_second(self) -> u8
Trait Implementations§
Source§impl Clone for UtcDateTime
impl Clone for UtcDateTime
impl Copy for UtcDateTime
Source§impl Debug for UtcDateTime
impl Debug for UtcDateTime
Source§impl Display for UtcDateTime
Formats UtcDateTime as an ISO-8601 UTC timestamp (YYYY-MM-DDTHH:MM:SSZ).
impl Display for UtcDateTime
Formats UtcDateTime as an ISO-8601 UTC timestamp (YYYY-MM-DDTHH:MM:SSZ).
impl Eq for UtcDateTime
Source§impl Hash for UtcDateTime
impl Hash for UtcDateTime
Source§impl Ord for UtcDateTime
impl Ord for UtcDateTime
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for UtcDateTime
impl PartialEq for UtcDateTime
Source§impl PartialOrd for UtcDateTime
impl PartialOrd for UtcDateTime
impl StructuralPartialEq for UtcDateTime
Auto Trait Implementations§
impl Forget for UtcDateTime
impl Freeze for UtcDateTime
impl Move for UtcDateTime
impl RefUnwindSafe for UtcDateTime
impl Send for UtcDateTime
impl Sync for UtcDateTime
impl Unpin for UtcDateTime
impl UnsafeUnpin for UtcDateTime
impl UnwindSafe for UtcDateTime
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