orx_selfref_col::references

Trait Refs

Source
pub trait Refs: Clone + Debug {
    // Required methods
    fn empty() -> Self;
    fn is_empty(&self) -> bool;
    fn clear(&mut self);
    fn remove_at(&mut self, ref_idx: usize);
    fn remove(&mut self, ptr: usize) -> Option<usize>;
}
Expand description

References among nodes.

Required Methods§

Source

fn empty() -> Self

Creates an empty references.

Source

fn is_empty(&self) -> bool

Returns true if the references collection is empty.

Source

fn clear(&mut self)

Clears the references.

Source

fn remove_at(&mut self, ref_idx: usize)

Removes the reference at the given ref_idx.

Source

fn remove(&mut self, ptr: usize) -> Option<usize>

Removes the node reference from references pointing to the node at given ptr location.

Returns the position of the ptr among references if it exists; None otherwise.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Refs for RefsNone

Source§

impl<V: Variant> Refs for RefsSingle<V>

Source§

impl<V: Variant> Refs for RefsVec<V>

Source§

impl<const N: usize, V> Refs for RefsArray<N, V>
where V: Variant,

Source§

impl<const N: usize, V> Refs for RefsArrayLeftMost<N, V>
where V: Variant,