Struct orx_linked_list::ListSlice
source · pub struct ListSlice<'a, V, M = MemoryReclaimOnThreshold<2, V, V::Reclaimer>>where
V: ListVariant,
M: MemoryPolicy<V>,{ /* private fields */ }Expand description
A 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.
Implementations§
source§impl<'a, V, M> ListSlice<'a, V, M>where
V: ListVariant,
M: MemoryPolicy<V>,
impl<'a, V, M> ListSlice<'a, V, M>where
V: ListVariant,
M: MemoryPolicy<V>,
Trait Implementations§
source§impl<'a, 'i, T, M> Index<&'i NodeIdx<Doubly<T>>> for ListSlice<'a, Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
impl<'a, 'i, T, M> Index<&'i NodeIdx<Doubly<T>>> for ListSlice<'a, Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
source§impl<'a, 'i, T, M> Index<&'i NodeIdx<Singly<T>>> for ListSlice<'a, Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
impl<'a, 'i, T, M> Index<&'i NodeIdx<Singly<T>>> for ListSlice<'a, Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
Auto Trait Implementations§
impl<'a, V, M> Freeze for ListSlice<'a, V, M>
impl<'a, V, M> RefUnwindSafe for ListSlice<'a, V, M>where
<V as Variant>::Ends: RefUnwindSafe,
M: RefUnwindSafe,
<V as Variant>::Prev: RefUnwindSafe,
<V as Variant>::Next: RefUnwindSafe,
<V as Variant>::Item: RefUnwindSafe,
impl<'a, V, M> Send for ListSlice<'a, V, M>
impl<'a, V, M> Sync for ListSlice<'a, V, M>
impl<'a, V, M> Unpin for ListSlice<'a, V, M>
impl<'a, V, M> UnwindSafe for ListSlice<'a, V, M>where
<V as Variant>::Ends: UnwindSafe + RefUnwindSafe,
M: RefUnwindSafe,
<V as Variant>::Prev: RefUnwindSafe,
<V as Variant>::Next: RefUnwindSafe,
<V as Variant>::Item: 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
source§impl<L, T, M> DoublyEnds<T, M> for Lwhere
L: HasDoublyEnds<T, M>,
M: MemoryPolicy<Doubly<T>>,
impl<L, T, M> DoublyEnds<T, M> for Lwhere
L: HasDoublyEnds<T, M>,
M: MemoryPolicy<Doubly<T>>,
source§fn front<'a>(&'a self) -> Option<&'a T>where
M: 'a,
fn front<'a>(&'a self) -> Option<&'a T>where
M: '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,
fn back<'a>(&'a self) -> Option<&'a T>where
M: '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<&T>where
M: 'a,
fn get<'a>(&'a self, idx: &DoublyIdx<T>) -> Option<&T>where
M: '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<&T, NodeIdxError>where
M: 'a,
fn try_get<'a>(&'a self, idx: &DoublyIdx<T>) -> Result<&T, NodeIdxError>where
M: '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<&T>where
M: 'a,
fn next_of<'a>(&'a self, idx: &DoublyIdx<T>) -> Option<&T>where
M: '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> DoublyIterable<T, M> for Lwhere
L: HasDoublyEnds<T, M>,
M: MemoryPolicy<Doubly<T>>,
impl<L, T, M> DoublyIterable<T, M> for Lwhere
L: HasDoublyEnds<T, M>,
M: MemoryPolicy<Doubly<T>>,
source§fn iter_ptr<'a>(&'a self) -> DoublyIterPtr<'_, T> ⓘwhere
M: 'a,
fn iter_ptr<'a>(&'a self) -> DoublyIterPtr<'_, T> ⓘ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<'_, T> ⓘwhere
M: 'a,
fn iter<'a>(&'a self) -> DoublyIter<'_, T> ⓘ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> ⓘwhere
M: 'a,
fn iter_links<'a>(&'a self) -> DoublyLinkIter<'a, T> ⓘ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,
fn indices<'a>(&'a self) -> impl Iterator<Item = DoublyIdx<T>>where
M: 'a,
T: 'a,
Returns an iterator of indices of elements of the list. Read more
source§fn ring_iter<'a>(
&'a self,
pivot_idx: &DoublyIdx<T>,
) -> Chain<DoublyIter<'a, T>, DoublyIter<'a, T>>where
M: 'a,
fn ring_iter<'a>(
&'a self,
pivot_idx: &DoublyIdx<T>,
) -> Chain<DoublyIter<'a, T>, DoublyIter<'a, T>>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<'_, T> ⓘwhere
M: 'a,
fn iter_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyIter<'_, T> ⓘwhere
M: 'a,
Creates a forward iterator: Read more
source§fn iter_backward_from<'a>(
&'a self,
idx: &DoublyIdx<T>,
) -> Rev<DoublyIter<'_, T>>where
M: 'a,
fn iter_backward_from<'a>(
&'a self,
idx: &DoublyIdx<T>,
) -> Rev<DoublyIter<'_, T>>where
M: 'a,
Creates a backward iterator: Read more
source§fn iter_links_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyLinkIter<'a, T> ⓘwhere
M: 'a,
fn iter_links_from<'a>(&'a self, idx: &DoublyIdx<T>) -> DoublyLinkIter<'a, T> ⓘ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> SinglyEnds<T, M> for Lwhere
L: HasSinglyEnds<T, M>,
M: MemoryPolicy<Singly<T>>,
impl<L, T, M> SinglyEnds<T, M> for Lwhere
L: HasSinglyEnds<T, M>,
M: MemoryPolicy<Singly<T>>,
source§fn front<'a>(&'a self) -> Option<&'a T>where
M: 'a,
fn front<'a>(&'a self) -> Option<&'a T>where
M: '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<&T>where
M: 'a,
fn get<'a>(&'a self, idx: &SinglyIdx<T>) -> Option<&T>where
M: '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<&T, NodeIdxError>where
M: 'a,
fn try_get<'a>(&'a self, idx: &SinglyIdx<T>) -> Result<&T, NodeIdxError>where
M: 'a,
O(1) Returns a reference to the node with the given
idx in constant time. Read moresource§impl<L, T, M> SinglyIterable<T, M> for Lwhere
L: HasSinglyEnds<T, M>,
M: MemoryPolicy<Singly<T>>,
impl<L, T, M> SinglyIterable<T, M> for Lwhere
L: HasSinglyEnds<T, M>,
M: MemoryPolicy<Singly<T>>,
source§fn iter_ptr<'a>(&'a self) -> SinglyIterPtr<'_, T> ⓘwhere
M: 'a,
fn iter_ptr<'a>(&'a self) -> SinglyIterPtr<'_, T> ⓘ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<'_, T> ⓘwhere
M: 'a,
fn iter<'a>(&'a self) -> SinglyIter<'_, T> ⓘ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,
fn indices<'a>(&'a self) -> impl Iterator<Item = SinglyIdx<T>>where
M: 'a,
T: 'a,
Returns an iterator of indices of elements of the list. Read more
source§fn iter_from<'a>(&'a self, idx: &SinglyIdx<T>) -> SinglyIter<'_, T> ⓘwhere
M: 'a,
fn iter_from<'a>(&'a self, idx: &SinglyIdx<T>) -> SinglyIter<'_, T> ⓘ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.