Struct miden_core::mast::JoinNode
source · 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
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.
source§impl JoinNode
impl JoinNode
Public accessors
sourcepub fn digest(&self) -> RpoDigest
pub fn digest(&self) -> RpoDigest
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);
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§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)