Struct kernel::linked_list::CursorMut
source · [−]pub struct CursorMut<'a, G: GetLinksWrapped> { /* private fields */ }
Expand description
A list cursor that allows traversing a linked list and inspecting & mutating elements.
Implementations
sourceimpl<'a, G: GetLinksWrapped> CursorMut<'a, G>
impl<'a, G: GetLinksWrapped> CursorMut<'a, G>
sourcepub fn current(&mut self) -> Option<&mut G::EntryType>
pub fn current(&mut self) -> Option<&mut G::EntryType>
Returns the element the cursor is currently positioned on.
sourcepub fn remove_current(&mut self) -> Option<G::Wrapped>
pub fn remove_current(&mut self) -> Option<G::Wrapped>
Removes the element the cursor is currently positioned on.
After removal, it advances the cursor to the next element.
sourcepub fn peek_next(&mut self) -> Option<&mut G::EntryType>
pub fn peek_next(&mut self) -> Option<&mut G::EntryType>
Returns the element immediately after the one the cursor is positioned on.
Auto Trait Implementations
impl<'a, G> RefUnwindSafe for CursorMut<'a, G>where
<G as GetLinks>::EntryType: RefUnwindSafe,
impl<'a, G> !Send for CursorMut<'a, G>
impl<'a, G> !Sync for CursorMut<'a, G>
impl<'a, G> Unpin for CursorMut<'a, G>
impl<'a, G> !UnwindSafe for CursorMut<'a, G>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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