Trait AsTree

Source
pub trait AsTree {
    // Required method
    fn _get_tree(&self, bits: &mut Vec<bool>) -> String;

    // Provided methods
    fn get_tree(&self) -> String { ... }
    fn _get_indent(&self, bits: Vec<bool>) -> String { ... }
    fn _get_intermediate(&self) -> String { ... }
    fn _get_end(&self) -> String { ... }
}
Expand description

This trait defines some simple methods for pretty-printing tree-like structures.

Required Methods§

Source

fn _get_tree(&self, bits: &mut Vec<bool>) -> String

Prints the tree of an AsTree-implementor starting with a particular indentation structure defined by bits. A true bit will print a vertical line, while a false bit will not.

Provided Methods§

Source

fn get_tree(&self) -> String

Returns a string representing the node and its children with tree formatting.

Source

fn _get_indent(&self, bits: Vec<bool>) -> String

Returns a string with the proper indents for a given entry in AsTree::get_tree. A true bit will yield a vertical line, while a false bit will not.

Source

fn _get_intermediate(&self) -> String

Returns a string with the intermediate branch symbol for a given entry in AsTree::get_tree.

Source

fn _get_end(&self) -> String

Prints the a final branch for a given entry in AsTree::get_tree.

Implementors§

Source§

impl<F: Field> AsTree for Amplitude<F>

Source§

impl<F: Field> AsTree for Imag<F>

Source§

impl<F: Field> AsTree for Model<F>

Source§

impl<F: Field> AsTree for NormSqr<F>

Source§

impl<F: Field> AsTree for Product<F>

Source§

impl<F: Field> AsTree for Real<F>

Source§

impl<F: Field> AsTree for Sum<F>