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
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<'a>(
&'a self,
forest: &'a MastForest,
) -> impl Iterator<Item = DecoratedOpLink> + 'a
fn decorators<'a>( &'a self, forest: &'a MastForest, ) -> impl Iterator<Item = DecoratedOpLink> + 'a
The list of decorators tied to this node, along with their associated index. Read more
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>
Returns the
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<'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.
Source§fn 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.
Source§type Builder = JoinNodeBuilder
type Builder = JoinNodeBuilder
Converts this node into its corresponding builder, reusing allocated data where possible.
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>
Returns a display formatter for this node.
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>
Returns a pretty printer for this node.
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, 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.
Source§fn 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.
fn to_builder(self, forest: &MastForest) -> Self::Builder
Source§fn 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.
impl Eq for JoinNode
impl StructuralPartialEq for JoinNode
Auto Trait Implementations§
impl Freeze for JoinNode
impl RefUnwindSafe for JoinNode
impl Send for JoinNode
impl Sync for JoinNode
impl Unpin for JoinNode
impl UnwindSafe for JoinNode
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