pub struct Link<T>(/* private fields */);Expand description
Intrusive next-pointer field for UnboundedQueue<T> nodes.
Embed this as a field in T and implement Linked (which only needs to
project to that field) instead of open-coding all four Node accessors.
Centralizes the AtomicPtr storage so node types no longer need
addr_of_mut!/AtomicPtr::from_ptr casts over a plain *mut T field.
#[repr(transparent)] so it has the same layout as the ?*T it ports.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Link<T>
impl<T> RefUnwindSafe for Link<T>
impl<T> Send for Link<T>
impl<T> Sync for Link<T>
impl<T> Unpin for Link<T>
impl<T> UnsafeUnpin for Link<T>
impl<T> UnwindSafe for Link<T>
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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