Trait OpenNodeRef

Source
pub trait OpenNodeRef<T> {
    // Required methods
    fn is_boundary(&self) -> bool;
    fn boundary(&self) -> impl Iterator<Item = Self>;
    fn get_value(&self) -> Option<&T>;
    fn parent_value(&self) -> Option<&T>;
}
Expand description

Extension trait for nodes in an open tree.

Required Methods§

Source

fn is_boundary(&self) -> bool

Is this node a boundary node?

Source

fn boundary(&self) -> impl Iterator<Item = Self>

Iterates over boundary of tree accessible from this node.

Source

fn get_value(&self) -> Option<&T>

Gets a reference to the value of this node, if it has one.

Source

fn parent_value(&self) -> Option<&T>

Gets a reference to the value of this node’s parent, if it has a parent.

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.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a> OpenNodeRef<T> for NodeRef<'a, Option<T>>

Source§

fn is_boundary(&self) -> bool

Source§

fn boundary(&self) -> impl Iterator<Item = Self>

Source§

fn get_value(&self) -> Option<&T>

Source§

fn parent_value(&self) -> Option<&T>

Implementors§