Struct libpulse_binding::time::UnixTs
source · #[repr(transparent)]pub struct UnixTs(_);
Expand description
A Unix timestamp.
Implementations§
source§impl UnixTs
impl UnixTs
sourcepub fn diff(a: &Self, b: &Self) -> MicroSeconds
pub fn diff(a: &Self, b: &Self) -> MicroSeconds
Calculates the difference between the two specified timestamps.
sourcepub fn age(&self) -> MicroSeconds
pub fn age(&self) -> MicroSeconds
Gets the time difference between now and self.
sourcepub fn checked_add(self, rhs: MicroSeconds) -> Option<Self>
pub fn checked_add(self, rhs: MicroSeconds) -> Option<Self>
Checked integer addition. Computes self + rhs
, returning None
if overflow occurred,
using the inner integer’s checked_add()
method.
sourcepub fn checked_sub(self, rhs: MicroSeconds) -> Option<Self>
pub fn checked_sub(self, rhs: MicroSeconds) -> Option<Self>
Checked integer subtraction. Computes self - rhs
, returning None
if overflow occurred,
using the inner integer’s checked_sub()
method.
Trait Implementations§
source§impl Add<MicroSeconds> for UnixTs
impl Add<MicroSeconds> for UnixTs
source§impl AddAssign<MicroSeconds> for UnixTs
impl AddAssign<MicroSeconds> for UnixTs
source§fn add_assign(&mut self, rhs: MicroSeconds)
fn add_assign(&mut self, rhs: MicroSeconds)
Performs the
+=
operation. Read moresource§impl Ord for UnixTs
impl Ord for UnixTs
source§impl PartialEq<UnixTs> for UnixTs
impl PartialEq<UnixTs> for UnixTs
source§impl PartialOrd<UnixTs> for UnixTs
impl PartialOrd<UnixTs> for UnixTs
1.0.0 · source§fn 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 moresource§impl Sub<MicroSeconds> for UnixTs
impl Sub<MicroSeconds> for UnixTs
source§impl SubAssign<MicroSeconds> for UnixTs
impl SubAssign<MicroSeconds> for UnixTs
source§fn sub_assign(&mut self, rhs: MicroSeconds)
fn sub_assign(&mut self, rhs: MicroSeconds)
Performs the
-=
operation. Read moreimpl Copy for UnixTs
impl Eq for UnixTs
impl StructuralEq for UnixTs
impl StructuralPartialEq for UnixTs
Auto Trait Implementations§
impl RefUnwindSafe for UnixTs
impl Send for UnixTs
impl Sync for UnixTs
impl Unpin for UnixTs
impl UnwindSafe for UnixTs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more