pub struct Node<T> {
pub value: T,
pub next: Option<Box<Node<T>>>,
}
Expand description
A node in a data structure.
This structure represents a single node that stores a value of type T
and optionally links to the next node in the list.
Fields§
§value: T
The value stored in this node.
next: Option<Box<Node<T>>>
The next node in the structure
or None
if this is the last node.
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>where
T: Send,
impl<T> Sync for Node<T>where
T: Sync,
impl<T> Unpin for Node<T>where
T: Unpin,
impl<T> UnwindSafe for Node<T>where
T: UnwindSafe,
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