pub struct DynNode { /* private fields */ }
Expand description
A Dyn node specifies that the node to be executed next is defined dynamically via the stack.
Implementations§
Source§impl DynNode
Constants
impl DynNode
Constants
Sourcepub const DYN_DOMAIN: Felt
pub const DYN_DOMAIN: Felt
The domain of the Dyn block (used for control block hashing).
Sourcepub const DYNCALL_DOMAIN: Felt
pub const DYNCALL_DOMAIN: Felt
The domain of the Dyncall block (used for control block hashing).
Source§impl DynNode
Public accessors
impl DynNode
Public accessors
Sourcepub fn new_dyncall() -> Self
pub fn new_dyncall() -> Self
Creates a new DynNode
representing a dyncall operation.
Sourcepub fn is_dyncall(&self) -> bool
pub fn is_dyncall(&self) -> bool
Returns true if the DynNode
represents a dyncall operation, and false for dynexec.
Trait Implementations§
Source§impl MastNodeErrorContext for DynNode
impl MastNodeErrorContext for DynNode
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 DynNode
impl MastNodeExt for DynNode
Source§fn digest(&self) -> Word
fn digest(&self) -> Word
Returns a commitment to a Dyn node.
The commitment is computed by hashing two empty words ([ZERO; 4]) in the domain defined by Self::DYN_DOMAIN or Self::DYNCALL_DOMAIN, i.e.:
Hasher::merge_in_domain(&[Word::default(), Word::default()], DynNode::DYN_DOMAIN);
Hasher::merge_in_domain(&[Word::default(), Word::default()], DynNode::DYNCALL_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
.