Struct AtomicF64

Source
pub struct AtomicF64(/* private fields */);

Implementations§

Source§

impl AtomicF64

Source

pub fn new(x: f64) -> Self

FIXME the constructor should be const, but cannot be made const until f64::to_bits is made const.

Source

pub fn load(&self, order: Ordering) -> f64

Source

pub fn store(&self, val: f64, order: Ordering)

Source

pub fn into_inner(self) -> f64

Source

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.

Source

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.

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.