pub struct SystemInstant { /* private fields */ }Expand description
A system time with the corresponding instant.
This should only be used for anchoring values of Instant for conversion into system time.
Implementations§
Source§impl SystemInstant
impl SystemInstant
pub const fn new(system_time: SystemTime, instant: Instant) -> Self
pub fn now() -> Self
pub fn system_time(&self) -> SystemTime
pub fn instant(&self) -> Instant
pub fn timestamp_utc(&self) -> Timestamp
pub fn checked_duration_since_instant( &self, since_instant: Instant, ) -> Option<Duration>
pub fn checked_duration_until_instant( &self, until_instant: Instant, ) -> Option<Duration>
pub fn checked_system_time_for_instant( &self, instant: Instant, ) -> Option<SystemTime>
Trait Implementations§
Source§impl Add<Duration> for SystemInstant
impl Add<Duration> for SystemInstant
Source§impl AddAssign<Duration> for SystemInstant
impl AddAssign<Duration> for SystemInstant
Source§fn add_assign(&mut self, rhs: Duration)
fn add_assign(&mut self, rhs: Duration)
Performs the
+= operation. Read moreSource§impl Clone for SystemInstant
impl Clone for SystemInstant
Source§fn clone(&self) -> SystemInstant
fn clone(&self) -> SystemInstant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemInstant
impl Debug for SystemInstant
Source§impl PartialEq for SystemInstant
impl PartialEq for SystemInstant
impl Eq for SystemInstant
impl StructuralPartialEq for SystemInstant
Auto Trait Implementations§
impl Freeze for SystemInstant
impl RefUnwindSafe for SystemInstant
impl Send for SystemInstant
impl Sync for SystemInstant
impl Unpin for SystemInstant
impl UnwindSafe for SystemInstant
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