pub struct Timestamp(/* private fields */);Expand description
The timestamp for values in the database.
This is an absolute time point, represented as a floating point time_t value with arbitrary resolutions, typically in the microsecond range.
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub fn with_resolution(st: SystemTime, res: Duration) -> Self
pub fn with_resolution(st: SystemTime, res: Duration) -> Self
Creates a timestamp with a specific resolution
Sourcepub fn with_resolution_f64(st: SystemTime, res: f64) -> Self
pub fn with_resolution_f64(st: SystemTime, res: f64) -> Self
Creates a timestamp with a resolution specified as floating point seconds.
So, for microsecond resolution use 1.0e-6; for millisecond resolution, 1.0e-3, etc.
Sourcepub fn into_system_time(self) -> SystemTime
pub fn into_system_time(self) -> SystemTime
Converts the time stamp to a system time value.
Trait Implementations§
Source§impl AddAssign<Duration> for Timestamp
impl AddAssign<Duration> for Timestamp
Source§fn add_assign(&mut self, dur: Duration)
fn add_assign(&mut self, dur: Duration)
Performs the
+= operation. Read moreSource§impl AddAssign<f64> for Timestamp
impl AddAssign<f64> for Timestamp
Source§fn add_assign(&mut self, dur: f64)
fn add_assign(&mut self, dur: f64)
Performs the
+= operation. Read moreSource§impl From<SystemTime> for Timestamp
impl From<SystemTime> for Timestamp
Source§fn from(st: SystemTime) -> Self
fn from(st: SystemTime) -> Self
Converts to this type from the input type.
Source§impl From<Timestamp> for SystemTime
impl From<Timestamp> for SystemTime
Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
Source§impl SubAssign<Duration> for Timestamp
impl SubAssign<Duration> for Timestamp
Source§fn sub_assign(&mut self, dur: Duration)
fn sub_assign(&mut self, dur: Duration)
Performs the
-= operation. Read moreSource§impl SubAssign<f64> for Timestamp
impl SubAssign<f64> for Timestamp
Source§fn sub_assign(&mut self, dur: f64)
fn sub_assign(&mut self, dur: f64)
Performs the
-= operation. Read moreimpl Copy for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
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