pub trait MastNodeExt {
type Builder: MastForestContributor;
// Required methods
fn digest(&self) -> Word;
fn before_enter<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId];
fn after_exit<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId];
fn to_display<'a>(
&'a self,
mast_forest: &'a MastForest,
) -> Box<dyn Display + 'a>;
fn to_pretty_print<'a>(
&'a self,
mast_forest: &'a MastForest,
) -> Box<dyn PrettyPrint + 'a>;
fn has_children(&self) -> bool;
fn append_children_to(&self, target: &mut Vec<MastNodeId>);
fn for_each_child<F>(&self, f: F)
where F: FnMut(MastNodeId);
fn domain(&self) -> BaseElement;
fn verify_node_in_forest(&self, forest: &MastForest);
fn to_builder(self, forest: &MastForest) -> Self::Builder;
}Required Associated Types§
Sourcetype Builder: MastForestContributor
type Builder: MastForestContributor
Converts this node into its corresponding builder, reusing allocated data where possible.
Required Methods§
Sourcefn before_enter<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
fn before_enter<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
Returns the decorators to be executed before this node is executed.
Sourcefn after_exit<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
fn after_exit<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
Returns the decorators to be executed after this node is executed.
Sourcefn to_display<'a>(
&'a self,
mast_forest: &'a MastForest,
) -> Box<dyn Display + 'a>
fn to_display<'a>( &'a self, mast_forest: &'a MastForest, ) -> Box<dyn Display + 'a>
Returns a display formatter for this node.
Sourcefn to_pretty_print<'a>(
&'a self,
mast_forest: &'a MastForest,
) -> Box<dyn PrettyPrint + 'a>
fn to_pretty_print<'a>( &'a self, mast_forest: &'a MastForest, ) -> Box<dyn PrettyPrint + 'a>
Returns a pretty printer for this node.
Sourcefn has_children(&self) -> bool
fn has_children(&self) -> bool
Returns true if the this node has children.
Sourcefn append_children_to(&self, target: &mut Vec<MastNodeId>)
fn append_children_to(&self, target: &mut Vec<MastNodeId>)
Appends the NodeIds of the children of this node, if any, to the vector.
Sourcefn for_each_child<F>(&self, f: F)where
F: FnMut(MastNodeId),
fn for_each_child<F>(&self, f: F)where
F: FnMut(MastNodeId),
Executes the given closure for each child of this node.
Sourcefn domain(&self) -> BaseElement
fn domain(&self) -> BaseElement
Returns the domain of this node.
Sourcefn verify_node_in_forest(&self, forest: &MastForest)
fn verify_node_in_forest(&self, forest: &MastForest)
Verifies that this node is stored at the ID in its decorators field in the forest.
fn to_builder(self, forest: &MastForest) -> Self::Builder
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.