pub struct AtomicView<'a, T> { /* private fields */ }Expand description
A view into a single atomic value inside a memory-mapped file.
Implements Deref so callers can call atomic operations
(load, store, fetch_add, compare_exchange, etc.) directly
on the view as if it were a &T.
§Lifetime semantics
While this view is alive, the parent mapping cannot be resized.
For RW mappings, the view holds a read lock; resize() (which
needs the write lock) will block until the view is dropped.
Trait Implementations§
Source§impl<T> Deref for AtomicView<'_, T>
impl<T> Deref for AtomicView<'_, T>
impl<T: Sync> Send for AtomicView<'_, T>
impl<T: Sync> Sync for AtomicView<'_, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for AtomicView<'a, T>
impl<'a, T> !UnwindSafe for AtomicView<'a, T>
impl<'a, T> Freeze for AtomicView<'a, T>
impl<'a, T> Unpin for AtomicView<'a, T>
impl<'a, T> UnsafeUnpin for AtomicView<'a, T>
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