#[repr(C)]pub struct InvokeArgsT<RegT> {
pub gas: i64,
pub regs: [RegT; 13],
}Expand description
Args for invoking an inner PVM.
Fields§
§gas: i64§regs: [RegT; 13]Implementations§
Source§impl InvokeArgsT<u32>
impl InvokeArgsT<u32>
Source§impl InvokeArgsT<u64>
impl InvokeArgsT<u64>
Source§impl<RegT> InvokeArgsT<RegT>
impl<RegT> InvokeArgsT<RegT>
Sourcepub fn set_return_value<T: SetReturnValue<RegT>>(&mut self, value: T)
pub fn set_return_value<T: SetReturnValue<RegT>>(&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) -> RegT
pub fn get_arg_reg(&self, i: usize) -> RegT
Get the value of the i-th argument’s register.
Sourcepub fn get_arg<T: Arg<RegT>>(&mut self, i: &mut usize) -> T
pub fn get_arg<T: Arg<RegT>>(&mut self, i: &mut usize) -> T
Get the value of the i-th argument.
Sourcepub fn set_arg_reg(&mut self, i: usize, value: RegT)
pub fn set_arg_reg(&mut self, i: usize, value: RegT)
Set the value of the i-th argument’s register.
Trait Implementations§
Source§impl<RegT: Clone> Clone for InvokeArgsT<RegT>
impl<RegT: Clone> Clone for InvokeArgsT<RegT>
Source§fn clone(&self) -> InvokeArgsT<RegT>
fn clone(&self) -> InvokeArgsT<RegT>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<RegT: Debug> Debug for InvokeArgsT<RegT>
impl<RegT: Debug> Debug for InvokeArgsT<RegT>
Source§impl<RegT> Decode for InvokeArgsT<RegT>
impl<RegT> Decode for InvokeArgsT<RegT>
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<RegT: Default> Default for InvokeArgsT<RegT>
impl<RegT: Default> Default for InvokeArgsT<RegT>
Source§fn default() -> InvokeArgsT<RegT>
fn default() -> InvokeArgsT<RegT>
Returns the “default value” for a type. Read more
Source§impl<RegT> Encode for InvokeArgsT<RegT>
impl<RegT> Encode for InvokeArgsT<RegT>
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<RegT> MaxEncodedLen for InvokeArgsT<RegT>
impl<RegT> MaxEncodedLen for InvokeArgsT<RegT>
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl<RegT: PartialEq> PartialEq for InvokeArgsT<RegT>
impl<RegT: PartialEq> PartialEq for InvokeArgsT<RegT>
impl ConstEncodedLen for InvokeArgsT<u32>
impl ConstEncodedLen for InvokeArgsT<u64>
impl<RegT: Copy> Copy for InvokeArgsT<RegT>
impl<RegT> EncodeLike for InvokeArgsT<RegT>
impl<RegT: Eq> Eq for InvokeArgsT<RegT>
impl<RegT> StructuralPartialEq for InvokeArgsT<RegT>
Auto Trait Implementations§
impl<RegT> Freeze for InvokeArgsT<RegT>where
RegT: Freeze,
impl<RegT> RefUnwindSafe for InvokeArgsT<RegT>where
RegT: RefUnwindSafe,
impl<RegT> Send for InvokeArgsT<RegT>where
RegT: Send,
impl<RegT> Sync for InvokeArgsT<RegT>where
RegT: Sync,
impl<RegT> Unpin for InvokeArgsT<RegT>where
RegT: Unpin,
impl<RegT> UnwindSafe for InvokeArgsT<RegT>where
RegT: UnwindSafe,
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