pub struct AtomicIsizeArray { /* private fields */ }
Expand description
A isize
array in which elements may be updated atomically.
Implementations§
Source§impl AtomicIsizeArray
impl AtomicIsizeArray
Sourcepub fn new(len: usize) -> Self
pub fn new(len: usize) -> Self
Constructs a new array with the specified length. All values will be initialized to their default.
Sourcepub fn new_with(len: usize, f: impl Fn(usize) -> isize) -> Self
pub fn new_with(len: usize, f: impl Fn(usize) -> isize) -> Self
Constructs a new array with the specified length. Uses the given function to construct each value.
Sourcepub fn load(&self, index: usize) -> isize
pub fn load(&self, index: usize) -> isize
Loads and returns the value at the given position.
Panics if index
is out of bounds.
Auto Trait Implementations§
impl Freeze for AtomicIsizeArray
impl RefUnwindSafe for AtomicIsizeArray
impl Send for AtomicIsizeArray
impl Sync for AtomicIsizeArray
impl Unpin for AtomicIsizeArray
impl UnwindSafe for AtomicIsizeArray
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