Trait TreeNode

Source
pub trait TreeNode<I: IntoIterator>: Sized {
    // Required methods
    fn get_children(&self) -> Option<I>;
    fn get_parent(&self) -> Option<I>;
    fn get_class(&self) -> Option<Rc<str>>;
}
Expand description

A trait for objects that can be used in a tree structure

Required Methods§

Source

fn get_children(&self) -> Option<I>

Returns an iterator over the children of the node

Source

fn get_parent(&self) -> Option<I>

Returns an iterator over the parent of the node

Source

fn get_class(&self) -> Option<Rc<str>>

Returns the class of the node

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§