TreeLike

Trait TreeLike 

Source
pub trait TreeLike
where Self: Sized,
{ // Required methods fn get_rule_id(&self, n: NodeID) -> RuleID; fn size(&self) -> usize; fn to_tree(&self, _: &Context) -> Tree; fn get_rule<'c>(&self, n: NodeID, ctx: &'c Context) -> &'c Rule; fn get_rule_or_custom(&self, n: NodeID) -> &RuleIDOrCustom; fn get_custom_rule_data(&self, n: NodeID) -> &[u8] ; // Provided methods fn get_nonterm_id(&self, n: NodeID, ctx: &Context) -> NTermID { ... } fn unparse<W: Write>(&self, id: NodeID, ctx: &Context, w: &mut W) { ... } fn unparse_to<W: Write>(&self, ctx: &Context, w: &mut W) { ... } fn unparse_to_vec(&self, ctx: &Context) -> Vec<u8> { ... } fn unparse_node_to_vec(&self, n: NodeID, ctx: &Context) -> Vec<u8> { ... } fn unparse_print(&self, ctx: &Context) { ... } }

Required Methods§

Source

fn get_rule_id(&self, n: NodeID) -> RuleID

Source

fn size(&self) -> usize

Source

fn to_tree(&self, _: &Context) -> Tree

Source

fn get_rule<'c>(&self, n: NodeID, ctx: &'c Context) -> &'c Rule

Source

fn get_rule_or_custom(&self, n: NodeID) -> &RuleIDOrCustom

Source

fn get_custom_rule_data(&self, n: NodeID) -> &[u8]

Provided Methods§

Source

fn get_nonterm_id(&self, n: NodeID, ctx: &Context) -> NTermID

Source

fn unparse<W: Write>(&self, id: NodeID, ctx: &Context, w: &mut W)

Source

fn unparse_to<W: Write>(&self, ctx: &Context, w: &mut W)

Source

fn unparse_to_vec(&self, ctx: &Context) -> Vec<u8>

Source

fn unparse_node_to_vec(&self, n: NodeID, ctx: &Context) -> Vec<u8>

Source

fn unparse_print(&self, ctx: &Context)

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§