pub struct Instant { /* private fields */ }Implementations§
Source§impl Instant
impl Instant
pub const fn nan() -> Self
pub fn is_nan(&self) -> bool
pub fn from_u64(val: u64) -> Self
pub fn as_u64(&self) -> u64
pub fn from_nanos(nanos: u64) -> Self
pub fn now() -> Self
pub fn raw_tsc(&self) -> u64
pub fn duration_since(&self, earlier: Instant) -> Duration
pub fn elapsed(&self) -> Duration
pub const fn infinite_future() -> Self
pub fn checked_sub_instant(&self, other: &Instant) -> Option<Duration>
pub fn checked_add_duration(&self, other: &Duration) -> Option<Instant>
pub fn checked_sub_duration(&self, other: &Duration) -> Option<Instant>
Trait Implementations§
Source§impl Ord for Instant
impl Ord for Instant
Source§impl PartialOrd for Instant
impl PartialOrd for Instant
impl Copy for Instant
impl Eq for Instant
impl StructuralPartialEq for Instant
Auto Trait Implementations§
impl Freeze for Instant
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnwindSafe for Instant
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