pub struct DateTime { /* private fields */ }Expand description
The representation for a civil datetime used by the TZif implementation.
We don’t use civil::DateTime here because we specifically
do not need to represent fractional seconds. This lets us easily represent
what we need in 8 bytes.
Moreover, we pack the fields into a single i64 to make comparisons
extremely cheap. This is especially useful since we do a binary search on
civil datetimes when determining the instant that corresponds to a civil
datetime.
Implementations§
Trait Implementations§
impl Copy for DateTime
impl Eq for DateTime
Source§impl From<DateTime> for DateTime
Creates a new bit packed datetime from jiff-core’s standard datetime type.
impl From<DateTime> for DateTime
Creates a new bit packed datetime from jiff-core’s standard datetime type.
Note that this completely ignores any fractional second component on the provided datetime.
Source§impl Ord for DateTime
impl Ord for DateTime
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 PartialOrd for DateTime
impl PartialOrd for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Forget for DateTime
impl Freeze for DateTime
impl Move for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnsafeUnpin for DateTime
impl UnwindSafe for DateTime
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