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 Now

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

Construct a new TimeSpec from its components

const fn tv_sec(&self) -> time_t
const fn tv_nsec(&self) -> c_long
const fn from_duration(duration: Duration) -> Self
const 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) -> &timespec

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) -> 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 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) -> T

Returns the argument unchanged.

impl<T> ToOwned for TimeSpec where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn 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) -> 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<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>