pub trait AtomicFiniteRangeNumber: AtomicNumberwhere
Self::NonAtomicType: FiniteRangeNumber,{
// Provided methods
fn fetch_saturating_add(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType { ... }
fn fetch_saturating_sub(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType { ... }
fn fetch_saturating_mul(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType { ... }
fn fetch_saturating_div(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType { ... }
fn fetch_saturating_pow(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType { ... }
}Expand description
An atomic finite number type.
Provided Methods§
Sourcefn fetch_saturating_add(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType
fn fetch_saturating_add( &self, value: Self::NonAtomicType, set_order: Ordering, fetch_order: Ordering, ) -> Self::NonAtomicType
Adds to the current value, returning the previous value.
This operation saturates at the bounds and does not overflow. For floats it saturates at the biggest non-infinity value and NAN are just forwarded.
This is a convenience method for
fetch_update.
Sourcefn fetch_saturating_sub(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType
fn fetch_saturating_sub( &self, value: Self::NonAtomicType, set_order: Ordering, fetch_order: Ordering, ) -> Self::NonAtomicType
Subtract from the current value, returning the previous value.
This operation saturates at the bounds and does not overflow. For floats it saturates at the biggest non infinity value and NAN are just forwarded.
This is a convenience method for fetch_update.
Sourcefn fetch_saturating_mul(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType
fn fetch_saturating_mul( &self, value: Self::NonAtomicType, set_order: Ordering, fetch_order: Ordering, ) -> Self::NonAtomicType
This is a convenience method for fetch_update.
Sourcefn fetch_saturating_div(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType
fn fetch_saturating_div( &self, value: Self::NonAtomicType, set_order: Ordering, fetch_order: Ordering, ) -> Self::NonAtomicType
This is a convenience method for fetch_update.
Sourcefn fetch_saturating_pow(
&self,
value: Self::NonAtomicType,
set_order: Ordering,
fetch_order: Ordering,
) -> Self::NonAtomicType
fn fetch_saturating_pow( &self, value: Self::NonAtomicType, set_order: Ordering, fetch_order: Ordering, ) -> Self::NonAtomicType
This is a convenience method for fetch_update.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.