Struct orx_selfref_col::NodeIdx
source · pub struct NodeIdx<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>) -> Self
pub fn new(state: MemoryState, node_ptr: &NodePtr<V>) -> Self
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§
impl<V: Copy + Variant> Copy for NodeIdx<V>
impl<V: Variant> Eq for NodeIdx<V>
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
)