pub struct CallNode { /* private fields */ }Expand description
A Call node describes a function call such that the callee is executed in a different execution context from the currently executing code.
A call node can be of two types:
- A simple call: the callee is executed in the new user context.
- A syscall: the callee is executed in the root context.
Implementations§
Source§impl CallNode
Constants
impl CallNode
Constants
Sourcepub const CALL_DOMAIN: Felt
pub const CALL_DOMAIN: Felt
The domain of the call block (used for control block hashing).
Sourcepub const SYSCALL_DOMAIN: Felt
pub const SYSCALL_DOMAIN: Felt
The domain of the syscall block (used for control block hashing).
Trait Implementations§
Source§impl MastNodeErrorContext for CallNode
impl MastNodeErrorContext for CallNode
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 CallNode
impl MastNodeExt for CallNode
Source§fn digest(&self) -> Word
fn digest(&self) -> Word
Returns a commitment to this Call node.
The commitment is computed as a hash of the callee and an empty word ([ZERO; 4]) in the domain defined by either Self::CALL_DOMAIN or Self::SYSCALL_DOMAIN, depending on whether the node represents a simple call or a syscall - i.e.,:
Hasher::merge_in_domain(&[callee_digest, Word::default()], CallNode::CALL_DOMAIN);or
Hasher::merge_in_domain(&[callee_digest, Word::default()], CallNode::SYSCALL_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 = CallNodeBuilder
type Builder = CallNodeBuilder
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 CallNode
impl StructuralPartialEq for CallNode
Auto Trait Implementations§
impl Freeze for CallNode
impl RefUnwindSafe for CallNode
impl Send for CallNode
impl Sync for CallNode
impl Unpin for CallNode
impl UnwindSafe for CallNode
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