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

source§

fn clone(&self) -> NodeRefNone

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NodeRefNone

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NodeRefNone

source§

fn default() -> NodeRefNone

Returns the “default value” for a type. Read more
source§

impl<'a, V, T> NodeRefs<'a, V, T> for NodeRefNone
where V: Variant<'a, T>,

§

type References = ()

Type of the underlying references.
source§

fn new(_: Self::References) -> Self

Creates a new node references for the given references.
source§

fn get(&self) -> &Self::References

Returns a reference to the underlying references.
source§

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>)

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,

Returns an iterator to the referenced nodes.
source§

fn empty() -> Self

Creates empty references.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V