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.
TODO: update hashing methodology to make it different from Loop block.
Implementations
sourceimpl Call
impl Call
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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Call
impl Send for Call
impl Sync for Call
impl Unpin for Call
impl UnwindSafe for Call
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more