Struct ach_linked::Node
source · [−]pub struct Node<T> { /* private fields */ }
Implementations
sourceimpl<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>ⓘNotable traits for NodeIter<'a, T>impl<'a, T> Iterator for NodeIter<'a, T> type Item = &'a mut Node<T>;
Trait Implementations
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more