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 Timevalpub fn new(sec: time_t, usec: suseconds_t) -> Self[src]
pub fn new(sec: time_t, usec: suseconds_t) -> SelfCreate a new instance, with values provided.
pub fn new_zero() -> Self[src]
pub fn new_zero() -> SelfCreate a new instance, with value of zero.
pub fn diff(a: &Self, b: &Self) -> MicroSeconds[src]
pub fn diff(a: &Self, b: &Self) -> MicroSecondsCalculate the difference between the two specified timeval structs.
pub fn age(&self) -> MicroSeconds[src]
pub fn age(&self) -> MicroSecondsReturn 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 Timevalimpl Clone for Timeval[src]
impl Clone for Timevalfn clone(&self) -> Timeval[src]
fn clone(&self) -> TimevalReturns 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 Timevalfn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Timeval[src]
impl Eq for Timevalimpl Ord for Timeval[src]
impl Ord for Timevalfn cmp(&self, other: &Self) -> Ordering[src]
fn cmp(&self, other: &Self) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialOrd for Timeval[src]
impl PartialOrd for Timevalfn 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) -> bool1.0.0[src]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
fn ge(&self, other: &Rhs) -> boolThis 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 Timevalfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Add for Timeval[src]
impl Add for Timevaltype Output = Self
The resulting type after applying the + operator.
fn add(self, other: Self) -> Self[src]
fn add(self, other: Self) -> SelfPerforms the + operation.
impl AddAssign for Timeval[src]
impl AddAssign for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: MicroSeconds) -> Self[src]
fn add(self, rhs: MicroSeconds) -> SelfPerforms the + operation.
impl AddAssign<MicroSeconds> for Timeval[src]
impl AddAssign<MicroSeconds> for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> Self[src]
fn add(self, rhs: Duration) -> SelfPerforms the + operation.
impl AddAssign<Duration> for Timeval[src]
impl AddAssign<Duration> for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the - operator.
fn sub(self, other: Self) -> Self[src]
fn sub(self, other: Self) -> SelfPerforms the - operation.
impl SubAssign for Timeval[src]
impl SubAssign for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the - operator.
fn sub(self, rhs: MicroSeconds) -> Self[src]
fn sub(self, rhs: MicroSeconds) -> SelfPerforms the - operation.
impl SubAssign<MicroSeconds> for Timeval[src]
impl SubAssign<MicroSeconds> for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> Self[src]
fn sub(self, rhs: Duration) -> SelfPerforms the - operation.
impl SubAssign<Duration> for Timeval[src]
impl SubAssign<Duration> for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the * operator.
fn mul(self, rhs: u32) -> Self[src]
fn mul(self, rhs: u32) -> SelfPerforms the * operation.
impl MulAssign<u32> for Timeval[src]
impl MulAssign<u32> for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the / operator.
fn div(self, rhs: u32) -> Self[src]
fn div(self, rhs: u32) -> SelfPerforms the / operation.
impl DivAssign<u32> for Timeval[src]
impl DivAssign<u32> for Timevalfn 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 Timevaltype Output = Self
The resulting type after applying the % operator.
fn rem(self, rhs: u32) -> Self[src]
fn rem(self, rhs: u32) -> SelfPerforms the % operation.
impl RemAssign<u32> for Timeval[src]
impl RemAssign<u32> for Timevalfn 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 MicroSecondsimpl From<MicroSeconds> for Timeval[src]
impl From<MicroSeconds> for Timevalfn from(t: MicroSeconds) -> Self[src]
fn from(t: MicroSeconds) -> SelfPerforms the conversion.
impl From<Duration> for Timeval[src]
impl From<Duration> for Timevalimpl From<Timeval> for Duration[src]
impl From<Timeval> for Duration