Struct TimeVal

struct TimeVal(_)

Implementations

impl TimeVal

const fn new(seconds: time_t, microseconds: suseconds_t) -> Self

Construct a new TimeVal from its components

const fn tv_sec(self: &Self) -> time_t
const fn tv_usec(self: &Self) -> suseconds_t

impl Add for TimeVal

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

impl AsMut for TimeVal

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

impl AsRef for TimeVal

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

impl Clone for TimeVal

fn clone(self: &Self) -> TimeVal

impl Copy for TimeVal

impl Debug for TimeVal

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

impl Display for TimeVal

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

impl Div for TimeVal

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

impl Eq for TimeVal

impl Freeze for TimeVal

impl From for TimeVal

fn from(tv: timeval) -> Self

impl Hash for TimeVal

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

impl Mul for TimeVal

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

impl Neg for TimeVal

fn neg(self: Self) -> TimeVal

impl Ord for TimeVal

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

impl PartialEq for TimeVal

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

impl PartialOrd for TimeVal

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

impl RefUnwindSafe for TimeVal

impl Send for TimeVal

impl StructuralPartialEq for TimeVal

impl Sub for TimeVal

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

impl Sync for TimeVal

impl TimeValLike for TimeVal

fn seconds(seconds: i64) -> TimeVal
fn milliseconds(milliseconds: i64) -> TimeVal
fn microseconds(microseconds: i64) -> TimeVal

Makes a new TimeVal with given number of microseconds.

fn nanoseconds(nanoseconds: i64) -> TimeVal

Makes a new TimeVal with given number of nanoseconds. Some precision will be lost

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 TimeVal

impl UnsafeUnpin for TimeVal

impl UnwindSafe for TimeVal

impl<T> Any for TimeVal

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TimeVal

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

impl<T> BorrowMut for TimeVal

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

impl<T> CloneToUninit for TimeVal

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

impl<T> From for TimeVal

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for TimeVal

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

impl<T> ToString for TimeVal

fn to_string(self: &Self) -> String

impl<T, U> Into for TimeVal

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 TimeVal

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

impl<T, U> TryInto for TimeVal

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