Struct Instant
pub struct Instant { pub(in ::sys::time::unix) t: Timespec }
Fields
t: Timespec
Implementations
impl Instant
const CLOCK_ID: clockid_t = libc::CLOCK_MONOTONIC;fn now() -> Instantfn checked_sub_instant(&self, other: &Instant) -> Option<Duration>fn checked_add_duration(&self, other: &Duration) -> Option<Instant>fn checked_sub_duration(&self, other: &Duration) -> Option<Instant>fn into_timespec(self) -> Timespec
Trait Implementations
impl AsInner<Timespec> for Instant
fn as_inner(&self) -> &Timespec
impl Clone for Instant
fn clone(&self) -> Instant
impl Copy for Instant
impl Debug for Instant
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Instant
fn assert_fields_are_eq(&self)
impl Hash for Instant
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for Instant
fn cmp(&self, other: &Instant) -> Ordering
impl PartialEq for Instant
fn eq(&self, other: &Instant) -> bool
impl PartialOrd for Instant
fn partial_cmp(&self, other: &Instant) -> Option<Ordering>
impl StructuralPartialEq for Instant
impl TrivialClone 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 UnsafeUnpin for Instant
impl UnwindSafe for Instant
Blanket Implementations
impl<T> Any for Instant
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Instant
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Instant
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Instant
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Instant
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for Instant
where
T: Copy + Debug,
impl<T> SizeHint for Instant
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Instant
impl<T> ToOwned for Instant
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Instant
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Instant
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Instant
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>