Struct common_traits::AtomicF32
source · pub struct AtomicF32(/* private fields */);Trait Implementations§
source§impl AsBytes for AtomicF32
impl AsBytes for AtomicF32
source§const BITS: usize = 32usize
const BITS: usize = 32usize
Convenience costant field equal to
AsBytes::BYTES * 8.source§impl Atomic for AtomicF32
impl Atomic for AtomicF32
§type NonAtomicType = f32
type NonAtomicType = f32
The non atomic variant of this type
source§fn new(value: Self::NonAtomicType) -> Self
fn new(value: Self::NonAtomicType) -> Self
Creates a new atomic integer.
source§fn load(&self, order: Ordering) -> Self::NonAtomicType
fn load(&self, order: Ordering) -> Self::NonAtomicType
Loads a value from the atomic integer. Read more
source§fn store(&self, value: Self::NonAtomicType, order: Ordering)
fn store(&self, value: Self::NonAtomicType, order: Ordering)
source§fn get_mut(&mut self) -> &mut Self::NonAtomicType
fn get_mut(&mut self) -> &mut Self::NonAtomicType
Returns a mutable reference to the underlying integer. Read more
source§fn into_inner(self) -> Self::NonAtomicType
fn into_inner(self) -> Self::NonAtomicType
Consumes the atomic and returns the contained value. Read more
fn into_non_atomic_array<const N: usize>( data: [Self; N] ) -> [Self::NonAtomicType; N]
fn from_non_atomic_array<const N: usize>( data: [Self::NonAtomicType; N] ) -> [Self; N]
fn get_mut_slice(this: &mut [Self]) -> &mut [Self::NonAtomicType]
fn from_mut_slice(this: &mut [Self::NonAtomicType]) -> &mut [Self]
fn get_mut_array<const N: usize>( this: &mut [Self; N] ) -> &mut [Self::NonAtomicType; N]
fn from_mut_array<const N: usize>( this: &mut [Self::NonAtomicType; N] ) -> &mut [Self; N]
source§fn compare_exchange(
&self,
current: Self::NonAtomicType,
new: Self::NonAtomicType,
success: Ordering,
failure: Ordering
) -> Result<Self::NonAtomicType, Self::NonAtomicType>
fn compare_exchange( &self, current: Self::NonAtomicType, new: Self::NonAtomicType, success: Ordering, failure: Ordering ) -> Result<Self::NonAtomicType, Self::NonAtomicType>
Stores a value into the atomic integer if the current value is the same
as the current value. Read more
source§fn compare_exchange_weak(
&self,
current: Self::NonAtomicType,
new: Self::NonAtomicType,
success: Ordering,
failure: Ordering
) -> Result<Self::NonAtomicType, Self::NonAtomicType>
fn compare_exchange_weak( &self, current: Self::NonAtomicType, new: Self::NonAtomicType, success: Ordering, failure: Ordering ) -> Result<Self::NonAtomicType, Self::NonAtomicType>
Stores a value into the atomic integer if the current value is the same
as the current value. Read more
source§fn swap(
&self,
value: Self::NonAtomicType,
order: Ordering
) -> Self::NonAtomicType
fn swap( &self, value: Self::NonAtomicType, order: Ordering ) -> Self::NonAtomicType
Stores a value into the atomic integer, returning the previous value. Read more
source§fn fetch_update<F>(
&self,
set_order: Ordering,
fetch_order: Ordering,
f: F
) -> Result<Self::NonAtomicType, Self::NonAtomicType>
fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F ) -> Result<Self::NonAtomicType, Self::NonAtomicType>
source§impl AtomicNumber for AtomicF32
impl AtomicNumber for AtomicF32
source§fn fetch_min(
&self,
value: Self::NonAtomicType,
order: Ordering
) -> Self::NonAtomicType
fn fetch_min( &self, value: Self::NonAtomicType, order: Ordering ) -> Self::NonAtomicType
Minimum with the current value. Read more
source§fn fetch_max(
&self,
value: Self::NonAtomicType,
order: Ordering
) -> Self::NonAtomicType
fn fetch_max( &self, value: Self::NonAtomicType, order: Ordering ) -> Self::NonAtomicType
Maximum with the current value. Read more
source§fn fetch_add(
&self,
value: Self::NonAtomicType,
order: Ordering
) -> Self::NonAtomicType
fn fetch_add( &self, value: Self::NonAtomicType, order: Ordering ) -> Self::NonAtomicType
Adds to the current value, returning the previous value. Read more
source§fn fetch_sub(
&self,
value: Self::NonAtomicType,
order: Ordering
) -> Self::NonAtomicType
fn fetch_sub( &self, value: Self::NonAtomicType, order: Ordering ) -> Self::NonAtomicType
Subtracts from the current value, returning the previous value. Read more
Auto Trait Implementations§
impl RefUnwindSafe for AtomicF32
impl Send for AtomicF32
impl Sync for AtomicF32
impl Unpin for AtomicF32
impl UnwindSafe for AtomicF32
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
source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
source§impl<T> FromBytes for T
impl<T> FromBytes for T
source§fn from_be_bytes(bytes: <T as AsBytes>::Bytes) -> T
fn from_be_bytes(bytes: <T as AsBytes>::Bytes) -> T
Create a native endian integer value from its representation as a byte
array in big endian.
source§fn from_ne_bytes(bytes: <T as AsBytes>::Bytes) -> T
fn from_ne_bytes(bytes: <T as AsBytes>::Bytes) -> T
Create a native endian integer value from its memory representation as
a byte array in native endianness.
As the target platform’s native endianness is used, portable code likely
wants to use from_be_bytes or from_le_bytes, as appropriate instead.
source§fn from_le_bytes(bytes: <T as AsBytes>::Bytes) -> T
fn from_le_bytes(bytes: <T as AsBytes>::Bytes) -> T
Create a native endian integer value from its representation as a byte
array in little endian.
source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.