Struct Timespec
pub(crate) struct Timespec { pub tv_sec: i64, pub tv_nsec: Nanoseconds }
Fields
tv_sec: i64tv_nsec: Nanoseconds
Implementations
impl Timespec
const MAX: Timespec = _;const MIN: Timespec = _;const unsafe fn new_unchecked(tv_sec: i64, tv_nsec: i64) -> Timespecconst fn zero() -> Timespecconst fn new(tv_sec: i64, tv_nsec: i64) -> Result<Timespec, Error>fn now(clock: clockid_t) -> Timespecfn sub_timespec(&self, other: &Timespec) -> Result<Duration, Duration>fn checked_add_duration(&self, other: &Duration) -> Option<Timespec>fn checked_sub_duration(&self, other: &Duration) -> Option<Timespec>fn to_timespec(&self) -> Option<timespec>
Trait Implementations
impl Clone for Timespec
fn clone(&self) -> Timespec
impl Copy for Timespec
impl Debug for Timespec
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Timespec
fn assert_fields_are_eq(&self)
impl Hash for Timespec
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for Timespec
fn cmp(&self, other: &Timespec) -> Ordering
impl PartialEq for Timespec
fn eq(&self, other: &Timespec) -> bool
impl PartialOrd for Timespec
fn partial_cmp(&self, other: &Timespec) -> Option<Ordering>
impl StructuralPartialEq for Timespec
impl TrivialClone for Timespec
Auto Trait Implementations
impl Freeze for Timespec
impl RefUnwindSafe for Timespec
impl Send for Timespec
impl Sync for Timespec
impl Unpin for Timespec
impl UnsafeUnpin for Timespec
impl UnwindSafe for Timespec
Blanket Implementations
impl<T> Any for Timespec
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Timespec
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Timespec
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Timespec
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Timespec
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for Timespec
where
T: Copy + Debug,
impl<T> SizeHint for Timespec
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Timespec
impl<T> ToOwned for Timespec
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Timespec
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 Timespec
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 Timespec
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>