pub struct InvokeArgs {
pub gas: i64,
pub regs: [u64; 13],
}
Expand description
Args for invoking an inner PVM.
Fields§
§gas: i64
§regs: [u64; 13]
Implementations§
Source§impl InvokeArgs
impl InvokeArgs
Sourcepub fn new(gas: i64) -> Self
pub fn new(gas: i64) -> Self
Initialize the gas to the specified value, initialize the registers to zeroes.
Sourcepub fn set_return_value<T: SetReturnValue>(&mut self, value: T)
pub fn set_return_value<T: SetReturnValue>(&mut self, value: T)
Set the contents of A0
and optinally A1
registers that typically store the return value
of a function call.
Sourcepub fn get_arg_reg(&self, i: usize) -> u64
pub fn get_arg_reg(&self, i: usize) -> u64
Get the value of the i
-th argument’s register.
Sourcepub fn set_arg_reg(&mut self, i: usize, value: u64)
pub fn set_arg_reg(&mut self, i: usize, value: u64)
Set the value of the i
-th argument’s register.
Trait Implementations§
Source§impl Debug for InvokeArgs
impl Debug for InvokeArgs
Source§impl From<InvokeArgs> for InvokeArgs
impl From<InvokeArgs> for InvokeArgs
Source§fn from(other: InvokeArgs) -> Self
fn from(other: InvokeArgs) -> Self
Converts to this type from the input type.
Source§impl From<InvokeArgs> for InvokeArgs
impl From<InvokeArgs> for InvokeArgs
Source§fn from(other: InvokeArgs) -> Self
fn from(other: InvokeArgs) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InvokeArgs
impl RefUnwindSafe for InvokeArgs
impl Send for InvokeArgs
impl Sync for InvokeArgs
impl Unpin for InvokeArgs
impl UnwindSafe for InvokeArgs
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