pub struct Caller<'a, T> { /* private fields */ }
Expand description
A handle used to access the execution context.
Implementations§
source§impl<'a, T> Caller<'a, T>
impl<'a, T> Caller<'a, T>
sourcepub fn into_ref(self) -> CallerRef<T>
pub fn into_ref(self) -> CallerRef<T>
Creates a caller handle with dynamically checked borrow rules.
pub fn split(self) -> (Caller<'a, ()>, &'a mut T)
pub fn data(&self) -> &T
pub fn data_mut(&mut self) -> &mut T
pub fn get_reg(&self, reg: Reg) -> u32
pub fn set_reg(&mut self, reg: Reg, value: u32)
pub fn read_memory_into_slice<'slice, B>(
&self,
address: u32,
buffer: &'slice mut B,
) -> Result<&'slice mut [u8], Trap>where
B: ?Sized + AsUninitSliceMut,
pub fn read_memory_into_vec( &self, address: u32, length: u32, ) -> Result<Vec<u8>, Trap>
pub fn read_u32(&self, address: u32) -> Result<u32, Trap>
pub fn write_memory(&mut self, address: u32, data: &[u8]) -> Result<(), Trap>
pub fn sbrk(&mut self, size: u32) -> Option<u32>
pub fn gas_remaining(&self) -> Option<Gas>
pub fn consume_gas(&mut self, gas: u64)
Auto Trait Implementations§
impl<'a, T> Freeze for Caller<'a, T>
impl<'a, T> RefUnwindSafe for Caller<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for Caller<'a, T>
impl<'a, T> !Sync for Caller<'a, T>
impl<'a, T> Unpin for Caller<'a, T>
impl<'a, T> !UnwindSafe for Caller<'a, T>
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