Struct libpulse_binding::time::MonotonicTs
source · pub struct MonotonicTs(_);
Expand description
A monotonic timestamp
Implementations
sourceimpl MonotonicTs
impl MonotonicTs
sourcepub fn now() -> Self
pub fn now() -> Self
Return the current monotonic system time in microseconds.
Note, if such a clock is not available then this will actually fall back to the wallclock
time instead. No indication is available for whether or not this is the case, and the
return value is still a MonotonicTs
type.
pub fn is_valid(&self) -> bool
pub fn checked_add(self, other: MicroSeconds) -> Option<Self>
pub fn checked_sub(self, other: MicroSeconds) -> Option<Self>
Trait Implementations
sourceimpl Add<MicroSeconds> for MonotonicTs
impl Add<MicroSeconds> for MonotonicTs
type Output = MonotonicTs
type Output = MonotonicTs
The resulting type after applying the
+
operator.sourcefn add(self, other: MicroSeconds) -> Self
fn add(self, other: MicroSeconds) -> Self
Performs the
+
operation. Read moresourceimpl AddAssign<MicroSeconds> for MonotonicTs
impl AddAssign<MicroSeconds> for MonotonicTs
sourcefn add_assign(&mut self, rhs: MicroSeconds)
fn add_assign(&mut self, rhs: MicroSeconds)
Performs the
+=
operation. Read moresourceimpl Clone for MonotonicTs
impl Clone for MonotonicTs
sourcefn clone(&self) -> MonotonicTs
fn clone(&self) -> MonotonicTs
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MonotonicTs
impl Debug for MonotonicTs
sourceimpl Default for MonotonicTs
impl Default for MonotonicTs
sourcefn default() -> MonotonicTs
fn default() -> MonotonicTs
Returns the “default value” for a type. Read more
sourceimpl Display for MonotonicTs
impl Display for MonotonicTs
sourceimpl Ord for MonotonicTs
impl Ord for MonotonicTs
sourcefn cmp(&self, other: &MonotonicTs) -> Ordering
fn cmp(&self, other: &MonotonicTs) -> Ordering
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 PartialEq<MonotonicTs> for MonotonicTs
impl PartialEq<MonotonicTs> for MonotonicTs
sourcefn eq(&self, other: &MonotonicTs) -> bool
fn eq(&self, other: &MonotonicTs) -> bool
sourceimpl PartialOrd<MonotonicTs> for MonotonicTs
impl PartialOrd<MonotonicTs> for MonotonicTs
sourcefn partial_cmp(&self, other: &MonotonicTs) -> Option<Ordering>
fn partial_cmp(&self, other: &MonotonicTs) -> 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 Sub<MicroSeconds> for MonotonicTs
impl Sub<MicroSeconds> for MonotonicTs
type Output = MonotonicTs
type Output = MonotonicTs
The resulting type after applying the
-
operator.sourcefn sub(self, other: MicroSeconds) -> Self
fn sub(self, other: MicroSeconds) -> Self
Performs the
-
operation. Read moresourceimpl SubAssign<MicroSeconds> for MonotonicTs
impl SubAssign<MicroSeconds> for MonotonicTs
sourcefn sub_assign(&mut self, rhs: MicroSeconds)
fn sub_assign(&mut self, rhs: MicroSeconds)
Performs the
-=
operation. Read moreimpl Copy for MonotonicTs
impl Eq for MonotonicTs
impl StructuralEq for MonotonicTs
impl StructuralPartialEq for MonotonicTs
Auto Trait Implementations
impl RefUnwindSafe for MonotonicTs
impl Send for MonotonicTs
impl Sync for MonotonicTs
impl Unpin for MonotonicTs
impl UnwindSafe for MonotonicTs
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