Struct nix::sys::time::TimeSpec

#[repr(C)]
pub struct TimeSpec(_);

Implementations

impl TimeSpec
pub const fn tv_sec(&Self) -> time_t
pub const fn tv_nsec(&Self) -> libc::c_long
pub const fn from_duration(duration: Duration) -> Self
pub const fn from_timespec(timespec: timespec) -> Self

Trait Implementations

impl Add<TimeSpec> 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) -> &timespec
impl Clone for TimeSpec
fn clone(&Self) -> TimeSpec
impl Copy for TimeSpec
impl Debug for TimeSpec
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Display for TimeSpec
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::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 Duration
fn from(timespec: TimeSpec) -> Self
impl From<timespec> for TimeSpec
fn from(ts: timespec) -> Self
impl Hash for TimeSpec
fn hash<__H: $crate::hash::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) -> cmp::Ordering
impl PartialEq<TimeSpec> for TimeSpec
fn eq(&Self, other: &TimeSpec) -> bool
fn ne(&Self, other: &TimeSpec) -> bool
impl PartialOrd<TimeSpec> for TimeSpec
fn partial_cmp(&Self, other: &TimeSpec) -> Option<cmp::Ordering>
impl Sub<TimeSpec> for TimeSpec
type Output = TimeSpec
fn sub(Self, rhs: TimeSpec) -> TimeSpec
impl TimeValLike for TimeSpec
fn seconds(seconds: i64) -> TimeSpec
fn milliseconds(milliseconds: i64) -> TimeSpec
fn microseconds(microseconds: i64) -> TimeSpec

Makes a new TimeSpec with given number of microseconds.

fn nanoseconds(nanoseconds: i64) -> TimeSpec

Makes a new TimeSpec with given number of nanoseconds.

fn num_seconds(&Self) -> i64
fn num_milliseconds(&Self) -> i64
fn num_microseconds(&Self) -> i64
fn num_nanoseconds(&Self) -> i64

Auto Trait Implementations

impl Send for TimeSpec
impl Sync for TimeSpec
impl Unpin for TimeSpec
impl UnwindSafe for TimeSpec

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T> ToString for T
where
    T: Display + ?Sized,
fn to_string(&Self) -> String
impl<T, U> TryFrom<U> for T
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 T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>