Struct TimeSpec
#[repr(C)]
pub struct TimeSpec(/* private field */);
Implementations
impl TimeSpec
const UTIME_OMIT: TimeSpec = _;Leave the timestamp unchanged.
const UTIME_NOW: TimeSpec = _;Update the timestamp to
Nowconst fn new(seconds: time_t, nanoseconds: c_long) -> SelfConstruct a new
TimeSpecfrom its componentsconst fn tv_sec(&self) -> time_tconst fn tv_nsec(&self) -> c_longconst fn from_duration(duration: Duration) -> Selfconst fn from_timespec(timespec: timespec) -> Self
Trait Implementations
impl Add for TimeSpec
type Output = TimeSpec;fn add(self, rhs: TimeSpec) -> TimeSpec
impl AsMut<timespec> for TimeSpec
fn as_mut(&mut self) -> &mut timespec
impl AsRef<timespec> for TimeSpec
fn as_ref(&self) -> ×pec
impl Clone for TimeSpec
fn clone(&self) -> Self
impl Copy for TimeSpec
impl Debug for TimeSpec
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for TimeSpec
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Div<i32> for TimeSpec
type Output = TimeSpec;fn div(self, rhs: i32) -> TimeSpec
impl Eq for TimeSpec
impl From<Duration> for TimeSpec
fn from(duration: Duration) -> Self
impl From<timespec> for TimeSpec
fn from(ts: timespec) -> Self
impl Hash for TimeSpec
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Mul<i32> for TimeSpec
type Output = TimeSpec;fn mul(self, rhs: i32) -> TimeSpec
impl Neg for TimeSpec
type Output = TimeSpec;fn neg(self) -> TimeSpec
impl Ord for TimeSpec
fn cmp(&self, other: &TimeSpec) -> Ordering
impl PartialEq for TimeSpec
fn eq(&self, other: &Self) -> bool
impl PartialOrd for TimeSpec
fn partial_cmp(&self, other: &TimeSpec) -> Option<Ordering>
impl StructuralPartialEq for TimeSpec
impl Sub for TimeSpec
type Output = TimeSpec;fn sub(self, rhs: TimeSpec) -> TimeSpec
impl TimeValLike for TimeSpec
fn seconds(seconds: i64) -> TimeSpecfn milliseconds(milliseconds: i64) -> TimeSpecfn microseconds(microseconds: i64) -> TimeSpecMakes a new
TimeSpecwith given number of microseconds.fn nanoseconds(nanoseconds: i64) -> TimeSpecMakes a new
TimeSpecwith given number of nanoseconds.fn num_seconds(&self) -> i64fn num_milliseconds(&self) -> i64fn num_microseconds(&self) -> i64fn num_nanoseconds(&self) -> i64
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> ToOwned for TimeSpec
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for TimeSpec
where
T: Display + ?Sized,
fn to_string(&self) -> String
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 = never;fn try_from(value: U) -> Result<T, never>
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>