pub struct EpochTime(/* private fields */);Expand description
Helper for validated epoch time construction.
Wraps a non-negative integer or finite float in the range 0 to
253402300799, as required by the CBOR::Core draft. Implements
TryFrom for all integer and float primitives as well as
SystemTime, so that Value::epoch_time can accept all of
these through a single TryInto<EpochTime> bound.
Whole-second values are stored as integers; sub-second values
(from floats or SystemTime with nanoseconds) are stored as
floats. Converting to Value produces a tag 1 wrapper.
Trait Implementations§
Source§impl Ord for EpochTime
impl Ord for EpochTime
Source§impl PartialOrd for EpochTime
impl PartialOrd for EpochTime
Source§impl TryFrom<SystemTime> for EpochTime
impl TryFrom<SystemTime> for EpochTime
impl Copy for EpochTime
impl Eq for EpochTime
impl StructuralPartialEq for EpochTime
Auto Trait Implementations§
impl Freeze for EpochTime
impl RefUnwindSafe for EpochTime
impl Send for EpochTime
impl Sync for EpochTime
impl Unpin for EpochTime
impl UnsafeUnpin for EpochTime
impl UnwindSafe for EpochTime
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