pub trait GrTreeExt {
// Required methods
fn get_dup(&mut self, dup_index: &mut Dup) -> usize;
fn to_str(
&self,
start_node: Option<usize>,
symbol_table: Option<&SymbolTable>,
) -> String;
fn to_str_index(
&self,
start_node: Option<usize>,
symbol_table: Option<&SymbolTable>,
) -> String;
}Expand description
Adds methods to GrTree.
NOTE: We must create a trait for GrTree since we can’t implement functions for an external type, and a type alias is not considered as a new type.