Enum miden_processor::MastNode
source · pub enum MastNode {
Block(BasicBlockNode),
Join(JoinNode),
Split(SplitNode),
Loop(LoopNode),
Call(CallNode),
Dyn,
External(ExternalNode),
}Variants§
Block(BasicBlockNode)
Join(JoinNode)
Split(SplitNode)
Loop(LoopNode)
Call(CallNode)
Dyn
External(ExternalNode)
Implementations§
source§impl MastNode
impl MastNode
Constructors
pub fn new_basic_block( operations: Vec<Operation>, decorators: Option<Vec<(usize, Decorator)>>, ) -> Result<MastNode, MastForestError>
pub fn new_join( left_child: MastNodeId, right_child: MastNodeId, mast_forest: &MastForest, ) -> Result<MastNode, MastForestError>
pub fn new_split( if_branch: MastNodeId, else_branch: MastNodeId, mast_forest: &MastForest, ) -> Result<MastNode, MastForestError>
pub fn new_loop( body: MastNodeId, mast_forest: &MastForest, ) -> Result<MastNode, MastForestError>
pub fn new_call( callee: MastNodeId, mast_forest: &MastForest, ) -> Result<MastNode, MastForestError>
pub fn new_syscall( callee: MastNodeId, mast_forest: &MastForest, ) -> Result<MastNode, MastForestError>
pub fn new_dyn() -> MastNode
pub fn new_external(mast_root: RpoDigest) -> MastNode
source§impl MastNode
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.
pub fn to_pretty_print<'a>( &'a self, mast_forest: &'a MastForest, ) -> impl PrettyPrint + 'a
pub fn domain(&self) -> BaseElement
pub fn digest(&self) -> RpoDigest
pub fn to_display<'a>( &'a self, mast_forest: &'a MastForest, ) -> impl Display + 'a
Trait Implementations§
impl Eq for MastNode
impl StructuralPartialEq for MastNode
Auto Trait Implementations§
impl Freeze for MastNode
impl RefUnwindSafe for MastNode
impl Send for MastNode
impl Sync for MastNode
impl Unpin for MastNode
impl UnwindSafe for MastNode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)