[−][src]Struct libpulse_binding::time::Timeval
Wrapper for libc::timeval
, attaching various methods and trait implementations.
Methods
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 From<Timeval> for MicroSeconds
[src]
impl From<MicroSeconds> for Timeval
[src]
fn from(t: MicroSeconds) -> Self
[src]
impl From<Duration> for Timeval
[src]
impl From<Timeval> for Duration
[src]
impl Clone for Timeval
[src]
impl Copy for Timeval
[src]
impl Eq for Timeval
[src]
impl Ord for Timeval
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Timeval> for Timeval
[src]
impl PartialOrd<Timeval> for Timeval
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Debug for Timeval
[src]
impl Div<u32> for Timeval
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Self
[src]
impl Rem<u32> for Timeval
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: u32) -> Self
[src]
impl Sub<Timeval> for Timeval
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl Sub<MicroSeconds> for Timeval
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: MicroSeconds) -> Self
[src]
impl Sub<Duration> for Timeval
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Duration) -> Self
[src]
impl Add<Timeval> for Timeval
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Add<MicroSeconds> for Timeval
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: MicroSeconds) -> Self
[src]
impl Add<Duration> for Timeval
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> Self
[src]
impl Mul<u32> for Timeval
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self
[src]
impl AddAssign<Timeval> for Timeval
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl AddAssign<MicroSeconds> for Timeval
[src]
fn add_assign(&mut self, rhs: MicroSeconds)
[src]
impl AddAssign<Duration> for Timeval
[src]
fn add_assign(&mut self, rhs: Duration)
[src]
impl SubAssign<Timeval> for Timeval
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl SubAssign<MicroSeconds> for Timeval
[src]
fn sub_assign(&mut self, rhs: MicroSeconds)
[src]
impl SubAssign<Duration> for Timeval
[src]
fn sub_assign(&mut self, rhs: Duration)
[src]
impl MulAssign<u32> for Timeval
[src]
fn mul_assign(&mut self, rhs: u32)
[src]
impl DivAssign<u32> for Timeval
[src]
fn div_assign(&mut self, rhs: u32)
[src]
impl RemAssign<u32> for Timeval
[src]
fn rem_assign(&mut self, rhs: u32)
[src]
Auto Trait Implementations
impl Send for Timeval
impl Sync for Timeval
impl Unpin for Timeval
impl UnwindSafe for Timeval
impl RefUnwindSafe for Timeval
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,