pub trait MastNodeExt {
// Required methods
fn digest(&self) -> Word;
fn before_enter(&self) -> &[DecoratorId];
fn after_exit(&self) -> &[DecoratorId];
fn append_before_enter(&mut self, decorator_ids: &[DecoratorId]);
fn append_after_exit(&mut self, decorator_ids: &[DecoratorId]);
fn remove_decorators(&mut self);
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 remap_children(
&self,
remapping: &BTreeMap<MastNodeId, MastNodeId>,
) -> Self;
fn has_children(&self) -> bool;
fn append_children_to(&self, target: &mut Vec<MastNodeId>);
fn domain(&self) -> BaseElement;
}
Required Methods§
Sourcefn before_enter(&self) -> &[DecoratorId]
fn before_enter(&self) -> &[DecoratorId]
Returns the decorators to be executed before this node is executed.
Sourcefn after_exit(&self) -> &[DecoratorId]
fn after_exit(&self) -> &[DecoratorId]
Returns the decorators to be executed after this node is executed.
Sourcefn append_before_enter(&mut self, decorator_ids: &[DecoratorId])
fn append_before_enter(&mut self, decorator_ids: &[DecoratorId])
Sets the list of decorators to be executed before this node.
Sourcefn append_after_exit(&mut self, decorator_ids: &[DecoratorId])
fn append_after_exit(&mut self, decorator_ids: &[DecoratorId])
Sets the list of decorators to be executed after this node.
Sourcefn remove_decorators(&mut self)
fn remove_decorators(&mut self)
Removes all decorators from this node.
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 remap_children(&self, remapping: &BTreeMap<MastNodeId, MastNodeId>) -> Self
fn remap_children(&self, remapping: &BTreeMap<MastNodeId, MastNodeId>) -> Self
Remap the node children to their new positions indicated by the given Remapping
.
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 domain(&self) -> BaseElement
fn domain(&self) -> BaseElement
Returns the domain of this node.
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.