pub struct DateTime<M> {
pub date: Date,
pub time: Time,
pub marker: M,
}Expand description
An ISO 8601 datetime with the timezone marker M (RFC 3339 §5.6).
This type makes no guarantees about the relationship between its fields, and in particular does
not guarantee that the time field represents a time that actually occurred on the date
represented by the date field; that is, it does not encode any information about leap
seconds.
Fields§
§date: DateThe date component.
time: TimeThe time component.
marker: MThe timezone marker.
Trait Implementations§
Source§impl<M> Display for DateTime<M>where
M: DateTimeMarker,
impl<M> Display for DateTime<M>where
M: DateTimeMarker,
Source§impl Display for DateTime<TimeFormat>
impl Display for DateTime<TimeFormat>
Source§impl<M: Ord> Ord for DateTime<M>
impl<M: Ord> Ord for DateTime<M>
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<M: PartialOrd> PartialOrd for DateTime<M>
impl<M: PartialOrd> PartialOrd for DateTime<M>
impl<M: Copy> Copy for DateTime<M>
impl<M: Eq> Eq for DateTime<M>
impl<M> StructuralPartialEq for DateTime<M>
Auto Trait Implementations§
impl<M> Freeze for DateTime<M>where
M: Freeze,
impl<M> RefUnwindSafe for DateTime<M>where
M: RefUnwindSafe,
impl<M> Send for DateTime<M>where
M: Send,
impl<M> Sync for DateTime<M>where
M: Sync,
impl<M> Unpin for DateTime<M>where
M: Unpin,
impl<M> UnsafeUnpin for DateTime<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for DateTime<M>where
M: UnwindSafe,
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