#[repr(C)]pub struct Node<T>where
T: Zeroable,{ /* private fields */ }
Expand description
A node in the singly linked list.
This structure holds an optional pointer to the value (item
)
and the next node (next
) in the list. The pointers are managed through
TESBox
, which allocates memory from the custom memory manager.
§Safety
The item
and next
are raw pointers that must be safely dropped using TESBox
to avoid memory leaks. If not dropped correctly, memory leakage can occur.
§Note
This list assumes that nodes with zero-initialized values (item
) are considered “empty” nodes.
You should not use such nodes directly as they might be unsafe unless they are properly initialized.
This pattern is a consequence of handling raw pointers and being FFI-compatible.
Implementations§
Trait Implementations§
impl<T> StructuralPartialEq for Node<T>where
T: Zeroable,
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