Subtree

Trait Subtree 

Source
pub trait Subtree: Sized {
    type Node;

    // Required methods
    fn get_pos(&self) -> usize;
    fn value(&self) -> Self::Node;
    fn parent(&self) -> Option<Self>;
    fn children(&self) -> Vec<Self>;
    fn child_values(&self) -> Vec<Self::Node>;
    fn first_child(&self) -> Option<Self>;
    fn prev_sibling(&self) -> Option<Self>;
    fn next_sibling(&self) -> Option<Self>;
}

Required Associated Types§

Required Methods§

Source

fn get_pos(&self) -> usize

Source

fn value(&self) -> Self::Node

Source

fn parent(&self) -> Option<Self>

Source

fn children(&self) -> Vec<Self>

Source

fn child_values(&self) -> Vec<Self::Node>

Source

fn first_child(&self) -> Option<Self>

Source

fn prev_sibling(&self) -> Option<Self>

Source

fn next_sibling(&self) -> Option<Self>

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§