pub struct Atomic<W: Well>(/* private fields */);Expand description
Atomic potential well.
Internally, this just wraps a pointer to Bucket<T> and uses atomic pointer
operations to access it. However, the number of operations on the pointer is limited to
ensure correctness in safe code.
Implementations§
Source§impl<W: Well> Atomic<W>
impl<W: Well> Atomic<W>
Sourcepub unsafe fn as_raw_unchecked(&self) -> &AtomicPtr<Target<W>>
pub unsafe fn as_raw_unchecked(&self) -> &AtomicPtr<Target<W>>
Gives access to the underlying AtomicPtr.
§Safety
The pointer inside the atomic must always a valid pointer from Well::remove and
therefore must not be null. Additionally, keep in mind that this atomic owns the
pointer, and if you want to move it out, you must put a different pointer in its place
first.
Source§impl<W: StrongWell + Deref<Target: Sized>> Atomic<W>
impl<W: StrongWell + Deref<Target: Sized>> Atomic<W>
Source§impl<W: StrongWellMut> Atomic<Pin<W>>
impl<W: StrongWellMut> Atomic<Pin<W>>
Trait Implementations§
Auto Trait Implementations§
impl<W> !Freeze for Atomic<W>
impl<W> RefUnwindSafe for Atomic<W>
impl<W> Send for Atomic<W>
impl<W> Sync for Atomic<W>
impl<W> Unpin for Atomic<W>
impl<W> UnsafeUnpin for Atomic<W>
impl<W> UnwindSafe for Atomic<W>
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