Struct libpulse_binding::time::Timeval [−][src]
#[repr(C)]pub struct Timeval(pub timeval);
Wrapper for libc::timeval
, attaching various methods and trait implementations
Methods
impl Timeval
[src]
impl Timeval
pub fn new(sec: time_t, usec: suseconds_t) -> Self
[src]
pub fn new(sec: time_t, usec: suseconds_t) -> Self
Create a new instance, with values provided.
pub fn new_zero() -> Self
[src]
pub fn new_zero() -> Self
Create a new instance, with value of zero.
pub fn diff(a: &Self, b: &Self) -> MicroSeconds
[src]
pub fn diff(a: &Self, b: &Self) -> MicroSeconds
Calculate the difference between the two specified timeval structs.
pub fn age(&self) -> MicroSeconds
[src]
pub fn age(&self) -> MicroSeconds
Return the time difference between now and self
pub fn checked_add(self, other: Self) -> Option<Self>
[src]
pub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_add_us(self, rhs: MicroSeconds) -> Option<Self>
[src]
pub fn checked_add_us(self, rhs: MicroSeconds) -> Option<Self>
pub fn checked_add_duration(self, rhs: Duration) -> Option<Self>
[src]
pub fn checked_add_duration(self, rhs: Duration) -> Option<Self>
pub fn checked_sub(self, other: Self) -> Option<Self>
[src]
pub fn checked_sub(self, other: Self) -> Option<Self>
pub fn checked_sub_us(self, rhs: MicroSeconds) -> Option<Self>
[src]
pub fn checked_sub_us(self, rhs: MicroSeconds) -> Option<Self>
pub fn checked_sub_duration(self, rhs: Duration) -> Option<Self>
[src]
pub fn checked_sub_duration(self, rhs: Duration) -> Option<Self>
pub fn checked_mul(self, rhs: u32) -> Option<Self>
[src]
pub fn checked_mul(self, rhs: u32) -> Option<Self>
pub fn checked_div(self, rhs: u32) -> Option<Self>
[src]
pub fn checked_div(self, rhs: u32) -> Option<Self>
pub fn checked_rem(self, rhs: u32) -> Option<Self>
[src]
pub fn checked_rem(self, rhs: u32) -> Option<Self>
Trait Implementations
impl Copy for Timeval
[src]
impl Copy for Timeval
impl Clone for Timeval
[src]
impl Clone for Timeval
fn clone(&self) -> Timeval
[src]
fn clone(&self) -> Timeval
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Timeval
[src]
impl PartialEq for Timeval
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for Timeval
[src]
impl Eq for Timeval
impl Ord for Timeval
[src]
impl Ord for Timeval
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Timeval
[src]
impl PartialOrd for Timeval
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for Timeval
[src]
impl Debug for Timeval
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Add for Timeval
[src]
impl Add for Timeval
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
fn add(self, other: Self) -> Self
Performs the +
operation.
impl AddAssign for Timeval
[src]
impl AddAssign for Timeval
fn add_assign(&mut self, rhs: Self)
[src]
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation.
impl Add<MicroSeconds> for Timeval
[src]
impl Add<MicroSeconds> for Timeval
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: MicroSeconds) -> Self
[src]
fn add(self, rhs: MicroSeconds) -> Self
Performs the +
operation.
impl AddAssign<MicroSeconds> for Timeval
[src]
impl AddAssign<MicroSeconds> for Timeval
fn add_assign(&mut self, rhs: MicroSeconds)
[src]
fn add_assign(&mut self, rhs: MicroSeconds)
Performs the +=
operation.
impl Add<Duration> for Timeval
[src]
impl Add<Duration> for Timeval
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> Self
[src]
fn add(self, rhs: Duration) -> Self
Performs the +
operation.
impl AddAssign<Duration> for Timeval
[src]
impl AddAssign<Duration> for Timeval
fn add_assign(&mut self, rhs: Duration)
[src]
fn add_assign(&mut self, rhs: Duration)
Performs the +=
operation.
impl Sub for Timeval
[src]
impl Sub for Timeval
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
fn sub(self, other: Self) -> Self
Performs the -
operation.
impl SubAssign for Timeval
[src]
impl SubAssign for Timeval
fn sub_assign(&mut self, rhs: Self)
[src]
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation.
impl Sub<MicroSeconds> for Timeval
[src]
impl Sub<MicroSeconds> for Timeval
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: MicroSeconds) -> Self
[src]
fn sub(self, rhs: MicroSeconds) -> Self
Performs the -
operation.
impl SubAssign<MicroSeconds> for Timeval
[src]
impl SubAssign<MicroSeconds> for Timeval
fn sub_assign(&mut self, rhs: MicroSeconds)
[src]
fn sub_assign(&mut self, rhs: MicroSeconds)
Performs the -=
operation.
impl Sub<Duration> for Timeval
[src]
impl Sub<Duration> for Timeval
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Duration) -> Self
[src]
fn sub(self, rhs: Duration) -> Self
Performs the -
operation.
impl SubAssign<Duration> for Timeval
[src]
impl SubAssign<Duration> for Timeval
fn sub_assign(&mut self, rhs: Duration)
[src]
fn sub_assign(&mut self, rhs: Duration)
Performs the -=
operation.
impl Mul<u32> for Timeval
[src]
impl Mul<u32> for Timeval
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self
[src]
fn mul(self, rhs: u32) -> Self
Performs the *
operation.
impl MulAssign<u32> for Timeval
[src]
impl MulAssign<u32> for Timeval
fn mul_assign(&mut self, rhs: u32)
[src]
fn mul_assign(&mut self, rhs: u32)
Performs the *=
operation.
impl Div<u32> for Timeval
[src]
impl Div<u32> for Timeval
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Self
[src]
fn div(self, rhs: u32) -> Self
Performs the /
operation.
impl DivAssign<u32> for Timeval
[src]
impl DivAssign<u32> for Timeval
fn div_assign(&mut self, rhs: u32)
[src]
fn div_assign(&mut self, rhs: u32)
Performs the /=
operation.
impl Rem<u32> for Timeval
[src]
impl Rem<u32> for Timeval
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: u32) -> Self
[src]
fn rem(self, rhs: u32) -> Self
Performs the %
operation.
impl RemAssign<u32> for Timeval
[src]
impl RemAssign<u32> for Timeval
fn rem_assign(&mut self, rhs: u32)
[src]
fn rem_assign(&mut self, rhs: u32)
Performs the %=
operation.
impl From<Timeval> for MicroSeconds
[src]
impl From<Timeval> for MicroSeconds
impl From<MicroSeconds> for Timeval
[src]
impl From<MicroSeconds> for Timeval
fn from(t: MicroSeconds) -> Self
[src]
fn from(t: MicroSeconds) -> Self
Performs the conversion.
impl From<Duration> for Timeval
[src]
impl From<Duration> for Timeval
impl From<Timeval> for Duration
[src]
impl From<Timeval> for Duration