pub enum PointInTime {
Absolute(AbsoluteTime),
Relative(RelativeTime),
}
Expand description
Represents a specific point in time, which could either be an AbsoluteTime (corresponding with a particular Date or DateTime), or a RelativeTime (corresponding with an offset from some AbsoluteTime or “now”).
Variants§
Absolute(AbsoluteTime)
Based on a specific Date or DateTime (fixed point) that involves no relative indirection, like “3 days after 18/3/2024”.
Relative(RelativeTime)
Based on an offset from some known fixed point in time, like “next tuesday”.
Trait Implementations§
Source§impl Clone for PointInTime
impl Clone for PointInTime
Source§fn clone(&self) -> PointInTime
fn clone(&self) -> PointInTime
Returns a duplicate of the value. Read more
1.0.0 · 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 PointInTime
impl Debug for PointInTime
Source§impl Display for PointInTime
impl Display for PointInTime
Source§impl FromStr for PointInTime
impl FromStr for PointInTime
Source§impl Hash for PointInTime
impl Hash for PointInTime
Source§impl Ord for PointInTime
impl Ord for PointInTime
Source§fn cmp(&self, other: &PointInTime) -> Ordering
fn cmp(&self, other: &PointInTime) -> Ordering
1.21.0 · 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
Source§impl Parse for PointInTime
impl Parse for PointInTime
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for PointInTime
impl PartialEq for PointInTime
Source§impl PartialOrd for PointInTime
impl PartialOrd for PointInTime
impl Copy for PointInTime
impl Eq for PointInTime
impl StructuralPartialEq for PointInTime
Auto Trait Implementations§
impl Freeze for PointInTime
impl RefUnwindSafe for PointInTime
impl Send for PointInTime
impl Sync for PointInTime
impl Unpin for PointInTime
impl UnwindSafe for PointInTime
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