pub struct LinkedList<T> { /* private fields */ }Implementations§
Source§impl<T> LinkedList<T>
impl<T> LinkedList<T>
pub const fn new() -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn take_all(&self) -> Option<&mut Node<T>>
pub fn take_all(&self) -> Option<&mut Node<T>>
delete all entries from LinkedList
If list is empty, return NULL, otherwise, delete all entries and return the pointer to the first entry.
Sourcepub unsafe fn push(&self, node: &mut Node<T>)
pub unsafe fn push(&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.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for LinkedList<T>
impl<T> RefUnwindSafe for LinkedList<T>
impl<T> Send for LinkedList<T>
impl<T> Sync for LinkedList<T>
impl<T> Unpin for LinkedList<T>
impl<T> UnwindSafe for LinkedList<T>where
T: 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