Struct libpulse_binding::time::Timeval  
source · #[repr(C)]pub struct Timeval(pub timeval);Expand description
Wrapper for libc::timeval, attaching various methods and trait implementations
Tuple Fields
0: timevalImplementations
sourceimpl Timeval
 
impl Timeval
sourcepub fn new(sec: time_t, usec: suseconds_t) -> Self
 
pub fn new(sec: time_t, usec: suseconds_t) -> Self
Create a new instance, with values provided.
sourcepub fn diff(a: &Self, b: &Self) -> MicroSeconds
 
pub fn diff(a: &Self, b: &Self) -> MicroSeconds
Calculate the difference between the two specified timeval structs.
sourcepub fn age(&self) -> MicroSeconds
 
pub fn age(&self) -> MicroSeconds
Return the time difference between now and self
pub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_add_us(self, rhs: MicroSeconds) -> Option<Self>
pub fn checked_add_duration(self, rhs: Duration) -> Option<Self>
pub fn checked_sub(self, other: Self) -> Option<Self>
pub fn checked_sub_us(self, rhs: MicroSeconds) -> Option<Self>
pub fn checked_sub_duration(self, rhs: Duration) -> Option<Self>
pub fn checked_mul(self, rhs: u32) -> Option<Self>
pub fn checked_div(self, rhs: u32) -> Option<Self>
pub fn checked_rem(self, rhs: u32) -> Option<Self>
Trait Implementations
sourceimpl Add<MicroSeconds> for Timeval
 
impl Add<MicroSeconds> for Timeval
sourceimpl AddAssign<Duration> for Timeval
 
impl AddAssign<Duration> for Timeval
sourcefn add_assign(&mut self, rhs: Duration)
 
fn add_assign(&mut self, rhs: Duration)
Performs the 
+= operation. Read moresourceimpl AddAssign<MicroSeconds> for Timeval
 
impl AddAssign<MicroSeconds> for Timeval
sourcefn add_assign(&mut self, rhs: MicroSeconds)
 
fn add_assign(&mut self, rhs: MicroSeconds)
Performs the 
+= operation. Read moresourceimpl AddAssign<Timeval> for Timeval
 
impl AddAssign<Timeval> for Timeval
sourcefn add_assign(&mut self, rhs: Self)
 
fn add_assign(&mut self, rhs: Self)
Performs the 
+= operation. Read moresourceimpl DivAssign<u32> for Timeval
 
impl DivAssign<u32> for Timeval
sourcefn div_assign(&mut self, rhs: u32)
 
fn div_assign(&mut self, rhs: u32)
Performs the 
/= operation. Read moresourceimpl From<MicroSeconds> for Timeval
 
impl From<MicroSeconds> for Timeval
sourcefn from(t: MicroSeconds) -> Self
 
fn from(t: MicroSeconds) -> Self
Converts to this type from the input type.
sourceimpl From<Timeval> for MicroSeconds
 
impl From<Timeval> for MicroSeconds
sourceimpl MulAssign<u32> for Timeval
 
impl MulAssign<u32> for Timeval
sourcefn mul_assign(&mut self, rhs: u32)
 
fn mul_assign(&mut self, rhs: u32)
Performs the 
*= operation. Read moresourceimpl Ord for Timeval
 
impl Ord for Timeval
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn min(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
    Self: Sized + PartialOrd<Self>,
 
fn clamp(self, min: Self, max: Self) -> Selfwhere
    Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Timeval> for Timeval
 
impl PartialOrd<Timeval> for Timeval
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
 
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
 
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 moresourceimpl RemAssign<u32> for Timeval
 
impl RemAssign<u32> for Timeval
sourcefn rem_assign(&mut self, rhs: u32)
 
fn rem_assign(&mut self, rhs: u32)
Performs the 
%= operation. Read moresourceimpl Sub<MicroSeconds> for Timeval
 
impl Sub<MicroSeconds> for Timeval
sourceimpl SubAssign<Duration> for Timeval
 
impl SubAssign<Duration> for Timeval
sourcefn sub_assign(&mut self, rhs: Duration)
 
fn sub_assign(&mut self, rhs: Duration)
Performs the 
-= operation. Read moresourceimpl SubAssign<MicroSeconds> for Timeval
 
impl SubAssign<MicroSeconds> for Timeval
sourcefn sub_assign(&mut self, rhs: MicroSeconds)
 
fn sub_assign(&mut self, rhs: MicroSeconds)
Performs the 
-= operation. Read moresourceimpl SubAssign<Timeval> for Timeval
 
impl SubAssign<Timeval> for Timeval
sourcefn sub_assign(&mut self, rhs: Self)
 
fn sub_assign(&mut self, rhs: Self)
Performs the 
-= operation. Read moreimpl Copy for Timeval
impl Eq for Timeval
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
sourceimpl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more