pub struct Node<T> {
pub val: T,
pub next: *mut Node<T>,
}Expand description
A linked list node that contains an instance of type T and a raw pointer
to the next entry in the node. Since atomic_try_update speculatively
executes code, it can not handle values of Box<T> soundly. Therefore,
this is the idiomatic way to store linked lists and stacks with
atomic_try_update.
TODO: Work out safety for this API.
Fields§
§val: T§next: *mut Node<T>Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Node<T>where
T: Freeze,
impl<T> RefUnwindSafe for Node<T>where
T: RefUnwindSafe,
impl<T> !Send for Node<T>
impl<T> !Sync for Node<T>
impl<T> Unpin for Node<T>where
T: Unpin,
impl<T> UnwindSafe for Node<T>where
T: UnwindSafe + RefUnwindSafe,
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