Struct orx_selfref_col::NodeRefNone
source · pub struct NodeRefNone(/* private fields */);
Expand description
An empty single node, used to represent cases where the node does not hold any reference.
The following are some example references which can be expressed by NodeRefNone
:
- previous node in a singly linked list;
- parent of a node in a tree where bottom up traversal is not necessary.
Trait Implementations§
source§impl Clone for NodeRefNone
impl Clone for NodeRefNone
source§fn clone(&self) -> NodeRefNone
fn clone(&self) -> NodeRefNone
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NodeRefNone
impl Debug for NodeRefNone
source§impl Default for NodeRefNone
impl Default for NodeRefNone
source§fn default() -> NodeRefNone
fn default() -> NodeRefNone
Returns the “default value” for a type. Read more
source§impl<'a, V, T> NodeRefs<'a, V, T> for NodeRefNonewhere
V: Variant<'a, T>,
impl<'a, V, T> NodeRefs<'a, V, T> for NodeRefNonewhere
V: Variant<'a, T>,
§type References = ()
type References = ()
Type of the underlying references.
source§fn new(_: Self::References) -> Self
fn new(_: Self::References) -> Self
Creates a new node references for the given
references
.source§fn get(&self) -> &Self::References
fn get(&self) -> &Self::References
Returns a reference to the underlying references.
source§fn get_mut(&mut self) -> &mut Self::References
fn get_mut(&mut self) -> &mut Self::References
Returns a mutable reference to the underlying references.
source§fn update_reference(&mut self, _: &'a Node<'a, V, T>, _: &'a Node<'a, V, T>)
fn update_reference(&mut self, _: &'a Node<'a, V, T>, _: &'a Node<'a, V, T>)
Updates this reference so that all internal references to the
prior_reference
are updated as new_reference
.
Does nothing if this NodeRefs
does not hold a reference to the prior_reference
.source§fn referenced_nodes(&self) -> impl Iterator<Item = &'a Node<'a, V, T>>where
V: 'a,
T: 'a,
fn referenced_nodes(&self) -> impl Iterator<Item = &'a Node<'a, V, T>>where
V: 'a,
T: 'a,
Returns an iterator to the referenced nodes.
Auto Trait Implementations§
impl RefUnwindSafe for NodeRefNone
impl Send for NodeRefNone
impl Sync for NodeRefNone
impl Unpin for NodeRefNone
impl UnwindSafe for NodeRefNone
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