Struct miden_core::code_blocks::Call
source · pub struct Call { /* private fields */ }
Expand description
A code block describing a function call.
When the VM executes a Call block, it simply executes the code of the underlying function. Thus, to execute a function call, the VM must have access to the function’s body, otherwise, the execution fails.
Hash of a Call block is computed by hashing a concatenation of the function’s body hash with zero.
Implementations§
source§impl Call
impl Call
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).
sourcepub fn new(fn_hash: Digest) -> Self
pub fn new(fn_hash: Digest) -> Self
Returns a new Call block instantiated with the specified function body hash.
sourcepub fn new_syscall(fn_hash: Digest) -> Self
pub fn new_syscall(fn_hash: Digest) -> Self
Returns a new Call block instantiated with the specified function body hash and marked as a kernel call.
sourcepub fn is_syscall(&self) -> bool
pub fn is_syscall(&self) -> bool
Returns true if this call block corresponds to a kernel call.