Struct TimeSpec

struct TimeSpec(_)

Implementations

impl TimeSpec

const fn new(seconds: time_t, nanoseconds: c_long) -> Self

Construct a new TimeSpec from its components

const fn tv_sec(self: &Self) -> time_t
const fn tv_nsec(self: &Self) -> c_long
const fn from_duration(duration: Duration) -> Self
const fn from_timespec(timespec: timespec) -> Self

impl Add for TimeSpec

fn add(self: Self, rhs: TimeSpec) -> TimeSpec

impl AsMut for TimeSpec

fn as_mut(self: &mut Self) -> &mut timespec

impl AsRef for TimeSpec

fn as_ref(self: &Self) -> &timespec

impl Clone for TimeSpec

fn clone(self: &Self) -> TimeSpec

impl Copy for TimeSpec

impl Debug for TimeSpec

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for TimeSpec

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Div for TimeSpec

fn div(self: Self, rhs: i32) -> TimeSpec

impl Eq for TimeSpec

impl Freeze for TimeSpec

impl From for TimeSpec

fn from(duration: Duration) -> Self

impl From for TimeSpec

fn from(ts: timespec) -> Self

impl Hash for TimeSpec

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl Mul for TimeSpec

fn mul(self: Self, rhs: i32) -> TimeSpec

impl Neg for TimeSpec

fn neg(self: Self) -> TimeSpec

impl Ord for TimeSpec

fn cmp(self: &Self, other: &TimeSpec) -> Ordering

impl PartialEq for TimeSpec

fn eq(self: &Self, other: &TimeSpec) -> bool

impl PartialOrd for TimeSpec

fn partial_cmp(self: &Self, other: &TimeSpec) -> Option<Ordering>

impl RefUnwindSafe for TimeSpec

impl Send for TimeSpec

impl StructuralPartialEq for TimeSpec

impl Sub for TimeSpec

fn sub(self: Self, rhs: TimeSpec) -> TimeSpec

impl Sync for 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: &Self) -> i64
fn num_milliseconds(self: &Self) -> i64
fn num_microseconds(self: &Self) -> i64
fn num_nanoseconds(self: &Self) -> i64

impl Unpin for TimeSpec

impl UnsafeUnpin for TimeSpec

impl UnwindSafe for TimeSpec

impl<T> Any for TimeSpec

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TimeSpec

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for TimeSpec

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for TimeSpec

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for TimeSpec

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for TimeSpec

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for TimeSpec

fn to_string(self: &Self) -> String

impl<T, U> Into for TimeSpec

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for TimeSpec

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for TimeSpec

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>