pub struct AtomicF64(/* private fields */);
Implementations§
Source§impl AtomicF64
impl AtomicF64
Sourcepub fn new(x: f64) -> Self
pub fn new(x: f64) -> Self
FIXME the constructor should be const, but cannot be made const until
f64::to_bits
is made const.
pub fn load(&self, order: Ordering) -> f64
pub fn store(&self, val: f64, order: Ordering)
pub fn into_inner(self) -> f64
Sourcepub fn fetch_add(&self, val: f64) -> f64
pub fn fetch_add(&self, val: f64) -> f64
Adds to the current value, returning the previous value. This operation
is always Ordering::Relaxed
, and thus cannot be used to protect
other memory or coordinate between threads.
Sourcepub fn fetch_sub(&self, val: f64) -> f64
pub fn fetch_sub(&self, val: f64) -> f64
Subtracts from the current value, returning the previous value. This
operation is always Ordering::Relaxed
, and thus cannot be used to
protect other memory or coordinate between threads.
Sourcepub fn compare_exchange_weak(
&self,
current: f64,
new: f64,
success: Ordering,
failure: Ordering,
) -> Result<f64, f64>
pub fn compare_exchange_weak( &self, current: f64, new: f64, success: Ordering, failure: Ordering, ) -> Result<f64, f64>
Stores a value if the current value is the same as the current
argument. See std::sync::atomic::AtomicU64::compare_exchange_weak for
details.
Auto Trait Implementations§
impl !Freeze for AtomicF64
impl RefUnwindSafe for AtomicF64
impl Send for AtomicF64
impl Sync for AtomicF64
impl Unpin for AtomicF64
impl UnwindSafe for AtomicF64
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