Struct orx_linked_list::NodeIdx
source · pub struct NodeIdx<V>where
V: Variant,{ /* private fields */ }Expand description
A node index providing safe and constant time access to elements of the self referential collection.
Implementations§
source§impl<V> NodeIdx<V>where
V: Variant,
impl<V> NodeIdx<V>where
V: Variant,
sourcepub fn new(state: MemoryState, node_ptr: &NodePtr<V>) -> NodeIdx<V>
pub fn new(state: MemoryState, node_ptr: &NodePtr<V>) -> NodeIdx<V>
Creates a new index for the element at the given node_ptr
and the collection with the given state.
sourcepub fn is_in_state(&self, state: MemoryState) -> bool
pub fn is_in_state(&self, state: MemoryState) -> bool
Checks whether or not the state of the index matches that of this index.
Trait Implementations§
source§impl<'i, T, M> Index<&'i NodeIdx<Doubly<T>>> for List<Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
impl<'i, T, M> Index<&'i NodeIdx<Doubly<T>>> for List<Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
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<Doubly<T>>> for ListSliceMut<'a, Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
impl<'a, 'i, T, M> Index<&'i NodeIdx<Doubly<T>>> for ListSliceMut<'a, Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
source§impl<'i, T, M> Index<&'i NodeIdx<Singly<T>>> for List<Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
impl<'i, T, M> Index<&'i NodeIdx<Singly<T>>> for List<Singly<T>, M>where
M: MemoryPolicy<Singly<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>>,
source§impl<'a, 'i, T, M> Index<&'i NodeIdx<Singly<T>>> for ListSliceMut<'a, Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
impl<'a, 'i, T, M> Index<&'i NodeIdx<Singly<T>>> for ListSliceMut<'a, Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
source§impl<'i, T, M> IndexMut<&'i NodeIdx<Doubly<T>>> for List<Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
impl<'i, T, M> IndexMut<&'i NodeIdx<Doubly<T>>> for List<Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
source§impl<'a, 'i, T, M> IndexMut<&'i NodeIdx<Doubly<T>>> for ListSliceMut<'a, Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
impl<'a, 'i, T, M> IndexMut<&'i NodeIdx<Doubly<T>>> for ListSliceMut<'a, Doubly<T>, M>where
M: MemoryPolicy<Doubly<T>>,
source§impl<'i, T, M> IndexMut<&'i NodeIdx<Singly<T>>> for List<Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
impl<'i, T, M> IndexMut<&'i NodeIdx<Singly<T>>> for List<Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
source§impl<'a, 'i, T, M> IndexMut<&'i NodeIdx<Singly<T>>> for ListSliceMut<'a, Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
impl<'a, 'i, T, M> IndexMut<&'i NodeIdx<Singly<T>>> for ListSliceMut<'a, Singly<T>, M>where
M: MemoryPolicy<Singly<T>>,
impl<V> Copy for NodeIdx<V>
impl<V> Eq for NodeIdx<V>where
V: Variant,
Auto Trait Implementations§
impl<V> Freeze for NodeIdx<V>
impl<V> RefUnwindSafe for NodeIdx<V>where
<V as Variant>::Prev: RefUnwindSafe,
<V as Variant>::Next: RefUnwindSafe,
<V as Variant>::Item: RefUnwindSafe,
impl<V> !Send for NodeIdx<V>
impl<V> !Sync for NodeIdx<V>
impl<V> Unpin for NodeIdx<V>
impl<V> UnwindSafe for NodeIdx<V>where
<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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)