pub struct ListSliceMut<'a, V, M = MemoryReclaimOnThreshold<2, V, V::Reclaimer>, P = SplitVec<Node<V>, Recursive>>{ /* private fields */ }
Expand description
A mutable slice of a linked list.
Note that a list slice itself behaves pretty much like a linked list. However, it does not own the data, but provides a view on it, just as a slice of a vec.
Trait Implementations§
Source§impl<'i, T, M, P> Index<&'i NodeIdx<Doubly<T>>> for ListSliceMut<'_, Doubly<T>, M, P>
impl<'i, T, M, P> Index<&'i NodeIdx<Doubly<T>>> for ListSliceMut<'_, Doubly<T>, M, P>
Source§impl<'i, T, M, P> Index<&'i NodeIdx<Singly<T>>> for ListSliceMut<'_, Singly<T>, M, P>
impl<'i, T, M, P> Index<&'i NodeIdx<Singly<T>>> for ListSliceMut<'_, Singly<T>, M, P>
Auto Trait Implementations§
impl<'a, V, M, P> Freeze for ListSliceMut<'a, V, M, P>
impl<'a, V, M, P> RefUnwindSafe for ListSliceMut<'a, V, M, P>
impl<'a, V, M, P> Send for ListSliceMut<'a, V, M, P>
impl<'a, V, M, P> Sync for ListSliceMut<'a, V, M, P>
impl<'a, V, M, P> Unpin for ListSliceMut<'a, V, M, P>
impl<'a, V, M = MemoryReclaimOnThreshold<2, V, <V as ListVariant>::Reclaimer>, P = SplitVec<Node<V>, Recursive>> !UnwindSafe for ListSliceMut<'a, V, M, P>
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
Source§impl<L, T, M, P> DoublyEnds<T, M, P> for L
impl<L, T, M, P> DoublyEnds<T, M, P> for L
Source§fn front<'a>(&'a self) -> Option<&'a T>where
M: 'a,
P: 'a,
fn front<'a>(&'a self) -> Option<&'a T>where
M: 'a,
P: 'a,
O(1) Returns a reference to the front of the list. Read more
Source§fn back<'a>(&'a self) -> Option<&'a T>where
M: 'a,
P: 'a,
fn back<'a>(&'a self) -> Option<&'a T>where
M: 'a,
P: 'a,
O(1) Returns a reference to the back of the list. Read more
Source§fn idx_err(&self, idx: &DoublyIdx<T>) -> Option<NodeIdxError>
fn idx_err(&self, idx: &DoublyIdx<T>) -> Option<NodeIdxError>
O(1) Returns a None if the given node
idx
is valid. Read moreSource§fn is_valid(&self, idx: &DoublyIdx<T>) -> bool
fn is_valid(&self, idx: &DoublyIdx<T>) -> bool
O(1) Returns whether or not the
idx
is valid for this list; i.e., Read moreSource§fn get<'a>(&'a self, idx: &DoublyIdx<T>) -> Option<&'a T>where
M: 'a,
P: 'a,
fn get<'a>(&'a self, idx: &DoublyIdx<T>) -> Option<&'a T>where
M: 'a,
P: 'a,
O(1) Returns a reference to the node with the given
idx
in constant time. Read moreSource§fn try_get<'a>(&'a self, idx: &DoublyIdx<T>) -> Result<&'a T, NodeIdxError>where
M: 'a,
P: 'a,
fn try_get<'a>(&'a self, idx: &DoublyIdx<T>) -> Result<&'a T, NodeIdxError>where
M: 'a,
P: 'a,
O(1) Returns a reference to the node with the given
idx
in constant time. Read moreSource§fn next_idx_of(&self, idx: &DoublyIdx<T>) -> Option<DoublyIdx<T>>
fn next_idx_of(&self, idx: &DoublyIdx<T>) -> Option<DoublyIdx<T>>
O(1) Returns the index of the element succeeding the one with the given
idx
.
Returns None if the element at idx
is the back
. Read moreSource§fn next_of<'a>(&'a self, idx: &DoublyIdx<T>) -> Option<&'a T>where
M: 'a,
P: 'a,
fn next_of<'a>(&'a self, idx: &DoublyIdx<T>) -> Option<&'a T>where
M: 'a,
P: 'a,
O(1) Returns the element succeeding the one with the given
idx
.
Returns None if the element at idx
is the back
. Read moreSource§impl<L, T, M, P> DoublyEndsMut<T, M, P> for L
impl<L, T, M, P> DoublyEndsMut<T, M, P> for L
Source§fn front_mut<'a>(&'a mut self) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn front_mut<'a>(&'a mut self) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the front of the list,
returns None if the list is empty. Read more
Source§fn back_mut<'a>(&'a mut self) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn back_mut<'a>(&'a mut self) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the back of the list,
returns None if the list is empty. Read more
Source§fn get_mut<'a>(&'a mut self, idx: &DoublyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn get_mut<'a>(&'a mut self, idx: &DoublyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the node with the given
idx
in constant time. Read moreSource§fn try_get_mut<'a>(
&'a mut self,
idx: &DoublyIdx<T>,
) -> Result<&'a mut T, NodeIdxError>where
M: 'a,
P: 'a,
fn try_get_mut<'a>(
&'a mut self,
idx: &DoublyIdx<T>,
) -> Result<&'a mut T, NodeIdxError>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the node with the given
idx
in constant time. Read moreSource§fn next_mut_of<'a>(&'a mut self, idx: &DoublyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn next_mut_of<'a>(&'a mut self, idx: &DoublyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the element succeeding the one with the given
idx
.
Returns None if the element at idx
is the back
. Read moreSource§fn prev_mut_of<'a>(&'a mut self, idx: &DoublyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn prev_mut_of<'a>(&'a mut self, idx: &DoublyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the element preceding the one with the given
idx
.
Returns None if the element at idx
is the front
. Read moreSource§fn move_next_to(&mut self, idx: &DoublyIdx<T>, idx_target: &DoublyIdx<T>)
fn move_next_to(&mut self, idx: &DoublyIdx<T>, idx_target: &DoublyIdx<T>)
O(1) Moves the element with the given
idx
immediately after the target element with the given idx_target
. Read moreSource§fn move_prev_to(&mut self, idx: &DoublyIdx<T>, idx_target: &DoublyIdx<T>)
fn move_prev_to(&mut self, idx: &DoublyIdx<T>, idx_target: &DoublyIdx<T>)
O(1) Moves the element with the given
idx
immediately before the target element with the given idx_target
. Read moreSource§fn move_to_front(&mut self, idx: &DoublyIdx<T>)
fn move_to_front(&mut self, idx: &DoublyIdx<T>)
O(1) Moves the element with the given
idx
to the front of the list. Read moreSource§fn move_to_back(&mut self, idx: &DoublyIdx<T>)
fn move_to_back(&mut self, idx: &DoublyIdx<T>)
O(1) Moves the element with the given
idx
to the back of the list. Read moreSource§unsafe fn remove_link(&mut self, a: &DoublyIdx<T>, b: &DoublyIdx<T>)
unsafe fn remove_link(&mut self, a: &DoublyIdx<T>, b: &DoublyIdx<T>)
Source§impl<L, T, M, P> DoublyIterable<T, M, P> for L
impl<L, T, M, P> DoublyIterable<T, M, P> for L
Source§fn iter_ptr<'a>(&'a self) -> DoublyIterPtr<'a, T, P> ⓘwhere
M: 'a,
fn iter_ptr<'a>(&'a self) -> DoublyIterPtr<'a, T, P> ⓘwhere
M: 'a,
Returns a double-ended iterator of pointers to the elements of the list from front to back.
Source§fn iter<'a>(&'a self) -> DoublyIter<'a, T, P> ⓘwhere
M: 'a,
fn iter<'a>(&'a self) -> DoublyIter<'a, T, P> ⓘwhere
M: 'a,
Returns a double-ended iterator to elements of the list: Read more
Source§fn iter_links<'a>(&'a self) -> DoublyLinkIter<'a, T, P> ⓘwhere
M: 'a,
fn iter_links<'a>(&'a self) -> DoublyLinkIter<'a, T, P> ⓘwhere
M: 'a,
Creates a forward iterator that yields pairs of successive elements representing links. Read more
Source§fn indices<'a>(&'a self) -> impl Iterator<Item = DoublyIdx<T>>where
M: 'a,
T: 'a,
P: 'a,
fn indices<'a>(&'a self) -> impl Iterator<Item = DoublyIdx<T>>where
M: 'a,
T: 'a,
P: 'a,
Returns an iterator of indices of elements of the list. Read more
Source§fn pointers<'a>(&'a self) -> impl Iterator<Item = DoublyPtr<T>>where
M: 'a,
T: 'a,
P: 'a,
fn pointers<'a>(&'a self) -> impl Iterator<Item = DoublyPtr<T>>where
M: 'a,
T: 'a,
P: 'a,
Returns an iterator of pointers to the elements of the list. Read more
Source§fn ring_iter<'a>(
&'a self,
pivot_idx: &DoublyIdx<T>,
) -> Chain<DoublyIter<'a, T, P>, DoublyIter<'a, T, P>>where
M: 'a,
fn ring_iter<'a>(
&'a self,
pivot_idx: &DoublyIdx<T>,
) -> Chain<DoublyIter<'a, T, P>, DoublyIter<'a, T, P>>where
M: 'a,
Creates a forward iterator starting from the
pivot_idx
and ending at the element before it. Read moreSource§fn iter_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyIter<'a, T, P> ⓘwhere
M: 'a,
fn iter_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyIter<'a, T, P> ⓘwhere
M: 'a,
Creates a forward iterator: Read more
Source§fn iter_backward_from<'a>(
&'a self,
idx: &DoublyIdx<T>,
) -> Rev<DoublyIter<'a, T, P>>where
M: 'a,
fn iter_backward_from<'a>(
&'a self,
idx: &DoublyIdx<T>,
) -> Rev<DoublyIter<'a, T, P>>where
M: 'a,
Creates a backward iterator: Read more
Source§fn iter_links_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyLinkIter<'a, T, P> ⓘwhere
M: 'a,
fn iter_links_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyLinkIter<'a, T, P> ⓘwhere
M: 'a,
Creates a forward iterator that yields pairs of successive elements representing links: Read more
Source§fn eq_to_iter_vals<I>(&self, iter: I) -> boolwhere
I: IntoIterator<Item = T>,
T: PartialEq,
fn eq_to_iter_vals<I>(&self, iter: I) -> boolwhere
I: IntoIterator<Item = T>,
T: PartialEq,
Returns true if the elements of the iterator are equal to those of the list.
Source§fn eq_to_iter_refs<'a, I>(&self, iter: I) -> bool
fn eq_to_iter_refs<'a, I>(&self, iter: I) -> bool
Returns true if the elements of the iterator are equal to those of the list.
Source§impl<L, T, M, P> DoublyIterableMut<T, M, P> for L
impl<L, T, M, P> DoublyIterableMut<T, M, P> for L
Source§fn iter_mut<'a>(&'a mut self) -> DoublyIterMut<'a, T, P> ⓘwhere
M: 'a,
fn iter_mut<'a>(&'a mut self) -> DoublyIterMut<'a, T, P> ⓘwhere
M: 'a,
Returns a double-ended iterator of mutable references to elements of the list from front to back. Read more
Source§fn iter_mut_from<'a>(
&'a mut self,
idx: &DoublyIdx<T>,
) -> DoublyIterMut<'a, T, P> ⓘwhere
M: 'a,
fn iter_mut_from<'a>(
&'a mut self,
idx: &DoublyIdx<T>,
) -> DoublyIterMut<'a, T, P> ⓘwhere
M: 'a,
Creates a mutable forward iterator: Read more
Source§fn iter_mut_backward_from<'a>(
&'a mut self,
idx: &DoublyIdx<T>,
) -> Rev<DoublyIterMut<'a, T, P>>where
M: 'a,
fn iter_mut_backward_from<'a>(
&'a mut self,
idx: &DoublyIdx<T>,
) -> Rev<DoublyIterMut<'a, T, P>>where
M: 'a,
Creates a mutable backward iterator: Read more
Source§fn ring_iter_mut<'a>(
&'a mut self,
pivot_idx: &DoublyIdx<T>,
) -> DoublyIterMutChain<'a, T, P> ⓘwhere
M: 'a,
fn ring_iter_mut<'a>(
&'a mut self,
pivot_idx: &DoublyIdx<T>,
) -> DoublyIterMutChain<'a, T, P> ⓘwhere
M: 'a,
Creates a mutable forward iterator starting from the
pivot_idx
and ending at the element before it. Read moreSource§impl<L, T, M, P> SinglyEnds<T, M, P> for L
impl<L, T, M, P> SinglyEnds<T, M, P> for L
Source§fn front<'a>(&'a self) -> Option<&'a T>where
M: 'a,
P: 'a,
fn front<'a>(&'a self) -> Option<&'a T>where
M: 'a,
P: 'a,
O(1) Returns a reference to the front of the list. Read more
Source§fn idx_err(&self, idx: &SinglyIdx<T>) -> Option<NodeIdxError>
fn idx_err(&self, idx: &SinglyIdx<T>) -> Option<NodeIdxError>
O(1) Returns a None if the given node
idx
is valid. Read moreSource§fn is_valid(&self, idx: &SinglyIdx<T>) -> bool
fn is_valid(&self, idx: &SinglyIdx<T>) -> bool
O(1) Returns whether or not the
idx
is valid for this list; i.e., Read moreSource§fn get<'a>(&'a self, idx: &SinglyIdx<T>) -> Option<&'a T>where
M: 'a,
P: 'a,
fn get<'a>(&'a self, idx: &SinglyIdx<T>) -> Option<&'a T>where
M: 'a,
P: 'a,
O(1) Returns a reference to the node with the given
idx
in constant time. Read moreSource§fn try_get<'a>(&'a self, idx: &SinglyIdx<T>) -> Result<&'a T, NodeIdxError>where
M: 'a,
P: 'a,
fn try_get<'a>(&'a self, idx: &SinglyIdx<T>) -> Result<&'a T, NodeIdxError>where
M: 'a,
P: 'a,
O(1) Returns a reference to the node with the given
idx
in constant time. Read moreSource§impl<L, T, M, P> SinglyEndsMut<T, M, P> for L
impl<L, T, M, P> SinglyEndsMut<T, M, P> for L
Source§fn front_mut<'a>(&'a mut self) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn front_mut<'a>(&'a mut self) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the front of the list,
returns None if the list is empty. Read more
Source§fn get_mut<'a>(&'a mut self, idx: &SinglyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
fn get_mut<'a>(&'a mut self, idx: &SinglyIdx<T>) -> Option<&'a mut T>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the node with the given
idx
in constant time. Read moreSource§fn try_get_mut<'a>(
&'a mut self,
idx: &SinglyIdx<T>,
) -> Result<&'a mut T, NodeIdxError>where
M: 'a,
P: 'a,
fn try_get_mut<'a>(
&'a mut self,
idx: &SinglyIdx<T>,
) -> Result<&'a mut T, NodeIdxError>where
M: 'a,
P: 'a,
O(1) Returns a mutable reference to the node with the given
idx
in constant time. Read moreSource§impl<L, T, M, P> SinglyIterable<T, M, P> for L
impl<L, T, M, P> SinglyIterable<T, M, P> for L
Source§fn iter_ptr<'a>(&'a self) -> SinglyIterPtr<'a, T, P> ⓘwhere
M: 'a,
fn iter_ptr<'a>(&'a self) -> SinglyIterPtr<'a, T, P> ⓘwhere
M: 'a,
Returns a double-ended iterator of pointers to the elements of the list from front to back.
Source§fn iter<'a>(&'a self) -> SinglyIter<'a, T, P> ⓘwhere
M: 'a,
fn iter<'a>(&'a self) -> SinglyIter<'a, T, P> ⓘwhere
M: 'a,
Returns a forward iterator to elements of the list from front to back. Read more
Source§fn indices<'a>(&'a self) -> impl Iterator<Item = SinglyIdx<T>>where
M: 'a,
T: 'a,
P: 'a,
fn indices<'a>(&'a self) -> impl Iterator<Item = SinglyIdx<T>>where
M: 'a,
T: 'a,
P: 'a,
Returns an iterator of indices of elements of the list. Read more
Source§fn pointers<'a>(&'a self) -> impl Iterator<Item = SinglyPtr<T>>where
M: 'a,
T: 'a,
P: 'a,
fn pointers<'a>(&'a self) -> impl Iterator<Item = SinglyPtr<T>>where
M: 'a,
T: 'a,
P: 'a,
Returns an iterator of pointers to the elements of the list. Read more
Source§fn iter_from<'a>(&'a self, idx: &SinglyIdx<T>) -> SinglyIter<'a, T, P> ⓘwhere
M: 'a,
fn iter_from<'a>(&'a self, idx: &SinglyIdx<T>) -> SinglyIter<'a, T, P> ⓘwhere
M: 'a,
Creates a forward iterator: Read more
Source§fn eq_to_iter_vals<I>(&self, iter: I) -> boolwhere
I: IntoIterator<Item = T>,
T: PartialEq,
fn eq_to_iter_vals<I>(&self, iter: I) -> boolwhere
I: IntoIterator<Item = T>,
T: PartialEq,
Returns true if the elements of the iterator are equal to those of the list.
Source§fn eq_to_iter_refs<'a, I>(&self, iter: I) -> bool
fn eq_to_iter_refs<'a, I>(&self, iter: I) -> bool
Returns true if the elements of the iterator are equal to those of the list.
Source§impl<L, T, M, P> SinglyIterableMut<T, M, P> for L
impl<L, T, M, P> SinglyIterableMut<T, M, P> for L
Source§fn iter_mut<'a>(&'a mut self) -> SinglyIterMut<'a, T, P> ⓘwhere
M: 'a,
fn iter_mut<'a>(&'a mut self) -> SinglyIterMut<'a, T, P> ⓘwhere
M: 'a,
Returns a double-ended iterator of mutable references to elements of the list from front to back. Read more
Source§fn iter_mut_from<'a>(
&'a mut self,
idx: &SinglyIdx<T>,
) -> SinglyIterMut<'a, T, P> ⓘwhere
M: 'a,
fn iter_mut_from<'a>(
&'a mut self,
idx: &SinglyIdx<T>,
) -> SinglyIterMut<'a, T, P> ⓘwhere
M: 'a,
Creates a mutable forward iterator: Read more