Enum timelang::PointInTime
source · 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 copy 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§fn eq(&self, other: &PointInTime) -> bool
fn eq(&self, other: &PointInTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PointInTime
impl PartialOrd for PointInTime
source§fn partial_cmp(&self, other: &PointInTime) -> Option<Ordering>
fn partial_cmp(&self, other: &PointInTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PointInTime
impl Eq for PointInTime
impl StructuralEq for PointInTime
impl StructuralPartialEq for PointInTime
Auto Trait Implementations§
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