pub struct Node<T> { /* private fields */ }
Implementations§
Source§impl<T> Node<T>
impl<T> Node<T>
pub const fn new(val: T) -> Self
pub fn next(&mut self) -> Option<&mut Node<T>>
pub fn take_next<'a, 'b>(&'a mut self) -> Option<&'b mut Node<T>>
pub fn last(&mut self) -> &mut Node<T>
Sourcepub unsafe fn push(&mut self, node: &mut Node<T>)
pub unsafe fn push(&mut self, node: &mut Node<T>)
Adds a node to the LinkedList.
Safety:
This function is only safe as long as node
is guaranteed to
get removed from the list before it gets moved or dropped.
Sourcepub unsafe fn push_list(&mut self, node: &mut Node<T>)
pub unsafe fn push_list(&mut self, node: &mut Node<T>)
Adds a list to the LinkedList.
Safety:
This function is only safe as long as node
is guaranteed to
get removed from the list before it gets moved or dropped.
Sourcepub fn remove_node(&mut self, node: &mut Node<T>) -> bool
pub fn remove_node(&mut self, node: &mut Node<T>) -> bool
remove child which eq node.
Notice: can’t remove head node.
pub fn into_iter(&mut self) -> NodeIter<'_, 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>
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