pub struct RawList<G: GetLinks> { /* private fields */ }Expand description
Implementations§
Source§impl<G: GetLinks> RawList<G>
impl<G: GetLinks> RawList<G>
Sourcepub fn iter(&self) -> Iterator<'_, G>
pub fn iter(&self) -> Iterator<'_, G>
Returns an iterator for the list starting at the first entry.
Sourcepub unsafe fn insert_after(
&mut self,
existing: &G::EntryType,
new: &G::EntryType,
) -> bool
pub unsafe fn insert_after( &mut self, existing: &G::EntryType, new: &G::EntryType, ) -> bool
Inserts the given object after existing.
§Safety
Callers must ensure that existing points to a valid entry that is on the list.
Sourcepub unsafe fn push_back(&mut self, new: &G::EntryType) -> bool
pub unsafe fn push_back(&mut self, new: &G::EntryType) -> bool
Adds the given object to the end (back) of the list.
Rawlist will save the reference as node ptr. The caller must ensure the validity of the reference while it is on the linked list.
Sourcepub unsafe fn push_front(&mut self, new: &G::EntryType) -> bool
pub unsafe fn push_front(&mut self, new: &G::EntryType) -> bool
Adds the given object to the first (front) of the list.
Rawlist will save the reference as node ptr. The caller must ensure the validity of the reference while it is on the linked list.
Sourcepub unsafe fn remove(&mut self, data: &G::EntryType) -> bool
pub unsafe fn remove(&mut self, data: &G::EntryType) -> bool
Removes the given entry.
§Safety
Callers must ensure that data is either on this list or in no list. It being on another
list leads to memory unsafety.
Sourcepub fn pop_front(&mut self) -> Option<NonNull<G::EntryType>>
pub fn pop_front(&mut self) -> Option<NonNull<G::EntryType>>
Get and Remove the first element of the list.
Sourcepub fn cursor_front_mut(&mut self) -> CursorMut<'_, G>
pub fn cursor_front_mut(&mut self) -> CursorMut<'_, G>
Returns a mut cursor starting on the first element of the list.