pub enum MastNode {
Block(BasicBlockNode),
Join(JoinNode),
Split(SplitNode),
Loop(LoopNode),
Call(CallNode),
Dyn(DynNode),
External(ExternalNode),
}
Variants§
Block(BasicBlockNode)
Join(JoinNode)
Split(SplitNode)
Loop(LoopNode)
Call(CallNode)
Dyn(DynNode)
External(ExternalNode)
Implementations§
Source§impl MastNode
Public accessors
impl MastNode
Public accessors
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Returns true if this node is an external node.
Sourcepub fn is_basic_block(&self) -> bool
pub fn is_basic_block(&self) -> bool
Returns true if this node is a basic block.
Sourcepub fn get_basic_block(&self) -> Option<&BasicBlockNode>
pub fn get_basic_block(&self) -> Option<&BasicBlockNode>
Returns the inner basic block node if the MastNode
wraps a BasicBlockNode
; None
otherwise.
Sourcepub fn unwrap_basic_block(&self) -> &BasicBlockNode
pub fn unwrap_basic_block(&self) -> &BasicBlockNode
Unwraps the inner basic block node if the MastNode
wraps a BasicBlockNode
; panics
otherwise.
§Panics
Panics if the MastNode
does not wrap a BasicBlockNode
.
Sourcepub fn unwrap_join(&self) -> &JoinNode
pub fn unwrap_join(&self) -> &JoinNode
Sourcepub fn unwrap_split(&self) -> &SplitNode
pub fn unwrap_split(&self) -> &SplitNode
Sourcepub fn unwrap_loop(&self) -> &LoopNode
pub fn unwrap_loop(&self) -> &LoopNode
Sourcepub fn unwrap_call(&self) -> &CallNode
pub fn unwrap_call(&self) -> &CallNode
Sourcepub fn unwrap_dyn(&self) -> &DynNode
pub fn unwrap_dyn(&self) -> &DynNode
Sourcepub fn unwrap_external(&self) -> &ExternalNode
pub fn unwrap_external(&self) -> &ExternalNode
Unwraps the inner external node if the MastNode
wraps a ExternalNode
; panics
otherwise.
§Panics
- if the
MastNode
does not wrap aExternalNode
.
Trait Implementations§
Source§impl From<BasicBlockNode> for MastNode
impl From<BasicBlockNode> for MastNode
Source§fn from(v: BasicBlockNode) -> MastNode
fn from(v: BasicBlockNode) -> MastNode
Source§impl From<ExternalNode> for MastNode
impl From<ExternalNode> for MastNode
Source§fn from(v: ExternalNode) -> MastNode
fn from(v: ExternalNode) -> MastNode
Source§impl MastNodeExt for MastNode
impl MastNodeExt for MastNode
Source§fn before_enter(&self) -> &[DecoratorId]
fn before_enter(&self) -> &[DecoratorId]
Returns the decorators to be executed before this node is executed.
Source§fn after_exit(&self) -> &[DecoratorId]
fn after_exit(&self) -> &[DecoratorId]
Returns the decorators to be executed after this node is executed.
Source§fn append_before_enter(&mut self, __enum_dispatch_arg_0: &[DecoratorId])
fn append_before_enter(&mut self, __enum_dispatch_arg_0: &[DecoratorId])
Sets the list of decorators to be executed before this node.
Source§fn append_after_exit(&mut self, __enum_dispatch_arg_0: &[DecoratorId])
fn append_after_exit(&mut self, __enum_dispatch_arg_0: &[DecoratorId])
Sets the list of decorators to be executed after this node.
Source§fn remove_decorators(&mut self)
fn remove_decorators(&mut self)
Removes all decorators from this node.
Source§fn to_display<'a>(
&'a self,
__enum_dispatch_arg_0: &'a MastForest,
) -> Box<dyn Display + 'a>
fn to_display<'a>( &'a self, __enum_dispatch_arg_0: &'a MastForest, ) -> Box<dyn Display + 'a>
Returns a display formatter for this node.
Source§fn to_pretty_print<'a>(
&'a self,
__enum_dispatch_arg_0: &'a MastForest,
) -> Box<dyn PrettyPrint + 'a>
fn to_pretty_print<'a>( &'a self, __enum_dispatch_arg_0: &'a MastForest, ) -> Box<dyn PrettyPrint + 'a>
Returns a pretty printer for this node.
Source§fn remap_children(&self, __enum_dispatch_arg_0: &Remapping) -> Self
fn remap_children(&self, __enum_dispatch_arg_0: &Remapping) -> Self
Remap the node children to their new positions indicated by the given Remapping
.
Source§fn has_children(&self) -> bool
fn has_children(&self) -> bool
Returns true if the this node has children.
Source§fn append_children_to(&self, __enum_dispatch_arg_0: &mut Vec<MastNodeId>)
fn append_children_to(&self, __enum_dispatch_arg_0: &mut Vec<MastNodeId>)
Appends the NodeIds of the children of this node, if any, to the vector.