Struct NodeIdx Copy item path Source pub struct NodeIdx<V>{ }Expand description A node index providing safe and constant time access to elements
of the self referential collection.
Creates a new index for the element at the given node_ptr
and the collection with the given state.
Checks whether or not the state of the index matches that of this index.
Returns the node pointer if the index is in the same state as the collection_state,
None otherwise.
§ SAFETY
This method is unsafe as NodeIdx implements Send and Sync.
It is safe dereference the received pointer if we know that is_valid_for(col) would
return true where col is the collection that this pointer is created from.
Converts the node index into a node pointer.
Returns true only if this index is valid for the given collection.
A node index is valid iff it satisfies the following two conditions:
It is created from the given collection.
Memory state of the collection has not changed since this index was created.
It is safe to use the unsafe methods of NodeIdx if is_valid_for(col)
returns true where col is the collection that the index is created from.
Returns a reference to the node that this NodeIdx corresponds to;
returns None if the index is invalid.
See Self::is_valid_for for validity conditions.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Returns the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
The returned type after indexing.
Returns the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
The returned type after indexing.
Returns the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
The returned type after indexing.
Returns the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
The returned type after indexing.
Returns the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
The returned type after indexing.
Returns the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
The returned type after indexing.
Returns a mutable reference to the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
Returns a mutable reference to the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
Returns a mutable reference to the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
Returns a mutable reference to the element at the given index.
§ Panics
Panics if the index is invalid; i.e.,
list.is_valid(index) returns false, equivalently,
list.idx_err(index) returns the detail of the error.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
Returns a reference to self.
Returns a mutable reference to self.
Returns a reference to self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.