pub struct JoinNode { /* private fields */ }
Expand description
A Join node describe sequential execution. When the VM encounters a Join node, it executes the first child first and the second child second.
Implementations§
Source§impl JoinNode
Constructors
impl JoinNode
Constructors
Sourcepub fn new(
children: [MastNodeId; 2],
mast_forest: &MastForest,
) -> Result<Self, MastForestError>
pub fn new( children: [MastNodeId; 2], mast_forest: &MastForest, ) -> Result<Self, MastForestError>
Returns a new JoinNode
instantiated with the specified children nodes.
Sourcepub fn new_unsafe(children: [MastNodeId; 2], digest: Word) -> Self
pub fn new_unsafe(children: [MastNodeId; 2], digest: Word) -> Self
Returns a new JoinNode
from values that are assumed to be correct.
Should only be used when the source of the inputs is trusted (e.g. deserialization).
Source§impl JoinNode
Public accessors
impl JoinNode
Public accessors
Sourcepub fn first(&self) -> MastNodeId
pub fn first(&self) -> MastNodeId
Returns the ID of the node that is to be executed first.
Sourcepub fn second(&self) -> MastNodeId
pub fn second(&self) -> MastNodeId
Returns the ID of the node that is to be executed after the execution of the program defined by the first node completes.
Trait Implementations§
Source§impl MastNodeErrorContext for JoinNode
impl MastNodeErrorContext for JoinNode
Source§fn decorators(&self) -> impl Iterator<Item = (usize, DecoratorId)>
fn decorators(&self) -> impl Iterator<Item = (usize, DecoratorId)>
Source§fn get_assembly_op<'m>(
&self,
mast_forest: &'m MastForest,
target_op_idx: Option<usize>,
) -> Option<&'m AssemblyOp>
fn get_assembly_op<'m>( &self, mast_forest: &'m MastForest, target_op_idx: Option<usize>, ) -> Option<&'m AssemblyOp>
AssemblyOp
associated with this node and operation (if provided), if any. Read moreSource§impl MastNodeExt for JoinNode
impl MastNodeExt for JoinNode
Source§fn digest(&self) -> Word
fn digest(&self) -> Word
Returns a commitment to this Join node.
The commitment is computed as a hash of the first
and second
child node in the domain
defined by Self::DOMAIN - i.e.,:
Hasher::merge_in_domain(&[first_child_digest, second_child_digest], JoinNode::DOMAIN);
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, decorator_ids: &[DecoratorId])
fn append_before_enter(&mut self, decorator_ids: &[DecoratorId])
Sets the list of decorators to be executed before this node.
Source§fn 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.
Source§fn remove_decorators(&mut self)
fn remove_decorators(&mut self)
Removes all decorators from this node.
Source§fn 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>
Source§fn 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>
Source§fn remap_children(&self, remapping: &Remapping) -> Self
fn remap_children(&self, remapping: &Remapping) -> Self
Remapping
.