Struct loom::sync::atomic::AtomicUsize

source ·
pub struct AtomicUsize(_);
Expand description

Mock implementation of std::sync::atomic::AtomicUsize.

Implementations

Creates a new instance of AtomicUsize.

Returns a mutable reference to the underlying integer.

Panics

This function panics if the access is invalid under the Rust memory model.

Loads a value from the atomic integer.

Stores a value into the atomic integer.

Stores a value into the atomic integer, returning the previous value.

Stores a value into the atomic integer if the current value is the same as the current value.

Stores a value into the atomic integer if the current value is the same as the current value.

Adds to the current value, returning the previous value.

Subtracts from the current value, returning the previous value.

Bitwise “and” with the current value.

Bitwise “or” with the current value.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.