[][src]Struct libpulse_binding::time::Timeval

#[repr(C)]pub struct Timeval(pub timeval);

Wrapper for libc::timeval, attaching various methods and trait implementations.

Implementations

impl Timeval[src]

pub const fn new(sec: time_t, usec: suseconds_t) -> Self[src]

Creates a new instance, with values provided.

pub const fn new_zero() -> Self[src]

Creates a new instance, with value of zero.

pub fn diff(a: &Self, b: &Self) -> MicroSeconds[src]

Calculates the difference between the two specified timeval structs.

pub fn age(&self) -> MicroSeconds[src]

Gets the time difference between now and self.

pub fn checked_add(self, other: Self) -> Option<Self>[src]

pub fn checked_add_us(self, rhs: MicroSeconds) -> Option<Self>[src]

pub fn checked_add_duration(self, rhs: Duration) -> Option<Self>[src]

pub fn checked_sub(self, other: Self) -> Option<Self>[src]

pub fn checked_sub_us(self, rhs: MicroSeconds) -> Option<Self>[src]

pub fn checked_sub_duration(self, rhs: Duration) -> Option<Self>[src]

pub fn checked_mul(self, rhs: u32) -> Option<Self>[src]

pub fn checked_div(self, rhs: u32) -> Option<Self>[src]

pub fn checked_rem(self, rhs: u32) -> Option<Self>[src]

Trait Implementations

impl Add<Duration> for Timeval[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<MicroSeconds> for Timeval[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Timeval> for Timeval[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Duration> for Timeval[src]

impl AddAssign<MicroSeconds> for Timeval[src]

impl AddAssign<Timeval> for Timeval[src]

impl Clone for Timeval[src]

impl Copy for Timeval[src]

impl Debug for Timeval[src]

impl Div<u32> for Timeval[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<u32> for Timeval[src]

impl Eq for Timeval[src]

impl From<Duration> for Timeval[src]

impl From<MicroSeconds> for Timeval[src]

impl From<Timeval> for MicroSeconds[src]

impl From<Timeval> for Duration[src]

impl Mul<u32> for Timeval[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<u32> for Timeval[src]

impl Ord for Timeval[src]

impl PartialEq<Timeval> for Timeval[src]

impl PartialOrd<Timeval> for Timeval[src]

impl Rem<u32> for Timeval[src]

type Output = Self

The resulting type after applying the % operator.

impl RemAssign<u32> for Timeval[src]

impl Sub<Duration> for Timeval[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<MicroSeconds> for Timeval[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<Timeval> for Timeval[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Duration> for Timeval[src]

impl SubAssign<MicroSeconds> for Timeval[src]

impl SubAssign<Timeval> for Timeval[src]

Auto Trait Implementations

impl RefUnwindSafe for Timeval

impl Send for Timeval

impl Sync for Timeval

impl Unpin for Timeval

impl UnwindSafe for Timeval

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.