Struct clocksource::Seconds
source · #[repr(transparent)]pub struct Seconds<T> { /* private fields */ }
Expand description
A container for time types that stores seconds.
Implementations§
source§impl Seconds<u32>
impl Seconds<u32>
pub fn checked_add(&self, other: Self) -> Option<Self>
pub fn checked_sub(&self, other: Self) -> Option<Self>
pub fn saturating_add(&self, other: Self) -> Self
pub fn saturating_sub(&self, other: Self) -> Self
source§impl Seconds<AtomicU32>
impl Seconds<AtomicU32>
pub fn new(value: Seconds<u32>) -> Self
pub fn load(&self, ordering: Ordering) -> Seconds<u32>
pub fn store(&self, value: Seconds<u32>, ordering: Ordering)
pub fn swap(&self, value: Seconds<u32>, ordering: Ordering) -> Seconds<u32>
pub fn compare_exchange(
&self,
current: Seconds<u32>,
new: Seconds<u32>,
success: Ordering,
failure: Ordering
) -> Result<Seconds<u32>, Seconds<u32>>
pub fn compare_exchange_weak(
&self,
current: Seconds<u32>,
new: Seconds<u32>,
success: Ordering,
failure: Ordering
) -> Result<Seconds<u32>, Seconds<u32>>
Trait Implementations§
source§impl AddAssign<Seconds<u32>> for Seconds<u32>
impl AddAssign<Seconds<u32>> for Seconds<u32>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<T> Ord for Seconds<T>where
T: Ord,
impl<T> Ord for Seconds<T>where
T: Ord,
source§impl<T> PartialOrd<Seconds<T>> for Seconds<T>where
T: PartialOrd,
impl<T> PartialOrd<Seconds<T>> for Seconds<T>where
T: PartialOrd,
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 SubAssign<Seconds<u32>> for Seconds<u32>
impl SubAssign<Seconds<u32>> for Seconds<u32>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read more