pub enum Timestamp {
Micros(TimestampMicros),
Nanos(TimestampNanos),
}
Expand description
A timestamp expressed as micros or nanos. You should seldom use this directly. Instead use one of:
TimestampNanos
TimestampMicros
Both of these types can try_into()
the Timestamp
type.
Both of these can be constructed from std::time::SystemTime
,
or from chrono::DateTime
.
Variants§
Micros(TimestampMicros)
Nanos(TimestampNanos)
Trait Implementations§
source§impl From<TimestampMicros> for Timestamp
impl From<TimestampMicros> for Timestamp
source§fn from(ts: TimestampMicros) -> Self
fn from(ts: TimestampMicros) -> Self
Converts to this type from the input type.
source§impl From<TimestampNanos> for Timestamp
impl From<TimestampNanos> for Timestamp
source§fn from(ts: TimestampNanos) -> Self
fn from(ts: TimestampNanos) -> Self
Converts to this type from the input type.
source§impl TryFrom<Timestamp> for TimestampMicros
impl TryFrom<Timestamp> for TimestampMicros
source§impl TryFrom<Timestamp> for TimestampNanos
impl TryFrom<Timestamp> for TimestampNanos
impl Copy for Timestamp
Auto Trait Implementations§
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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