Struct TimeVal
#[repr(transparent)]
pub struct TimeVal(/* private field */);
Implementations
impl TimeVal
const fn new(seconds: time_t, microseconds: suseconds_t) -> SelfConstruct a new
TimeValfrom its componentsconst fn tv_sec(&self) -> time_tconst fn tv_usec(&self) -> suseconds_t
Trait Implementations
impl Add for TimeVal
type Output = TimeVal;fn add(self, rhs: TimeVal) -> TimeVal
impl AsMut<timeval> for TimeVal
fn as_mut(&mut self) -> &mut timeval
impl AsRef<timeval> for TimeVal
fn as_ref(&self) -> &timeval
impl Clone for TimeVal
fn clone(&self) -> Self
impl Copy for TimeVal
impl Debug for TimeVal
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for TimeVal
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Div<i32> for TimeVal
type Output = TimeVal;fn div(self, rhs: i32) -> TimeVal
impl Eq for TimeVal
impl From<timeval> for TimeVal
fn from(tv: timeval) -> Self
impl Hash for TimeVal
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Mul<i32> for TimeVal
type Output = TimeVal;fn mul(self, rhs: i32) -> TimeVal
impl Neg for TimeVal
type Output = TimeVal;fn neg(self) -> TimeVal
impl Ord for TimeVal
fn cmp(&self, other: &TimeVal) -> Ordering
impl PartialEq for TimeVal
fn eq(&self, other: &Self) -> bool
impl PartialOrd for TimeVal
fn partial_cmp(&self, other: &TimeVal) -> Option<Ordering>
impl StructuralPartialEq for TimeVal
impl Sub for TimeVal
type Output = TimeVal;fn sub(self, rhs: TimeVal) -> TimeVal
impl TimeValLike for TimeVal
fn seconds(seconds: i64) -> TimeValfn milliseconds(milliseconds: i64) -> TimeValfn microseconds(microseconds: i64) -> TimeValMakes a new
TimeValwith given number of microseconds.fn nanoseconds(nanoseconds: i64) -> TimeValMakes a new
TimeValwith given number of nanoseconds. Some precision will be lostfn num_seconds(&self) -> i64fn num_milliseconds(&self) -> i64fn num_microseconds(&self) -> i64fn num_nanoseconds(&self) -> i64
Auto Trait Implementations
impl Freeze for TimeVal
impl RefUnwindSafe for TimeVal
impl Send for TimeVal
impl Sync for TimeVal
impl Unpin for TimeVal
impl UnsafeUnpin for TimeVal
impl UnwindSafe for TimeVal
Blanket Implementations
impl<T> Any for TimeVal
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TimeVal
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TimeVal
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for TimeVal
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for TimeVal
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TimeVal
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for TimeVal
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for TimeVal
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 TimeVal
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TimeVal
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>