Skip to main content

ContractDebugInstanceState

Struct ContractDebugInstanceState 

Source
pub struct ContractDebugInstanceState;

Implementations§

Source§

impl ContractDebugInstanceState

Source

pub unsafe fn main_memory_load( mem_ptr: MemPtr, mem_length: MemLength, ) -> &'static [u8]

Interprets the input as a regular pointer.

§Safety

The offset and the length must point to valid memory.

Source

pub unsafe fn main_memory_store(offset: MemPtr, data: &[u8])

Interprets the input as a regular pointer and writes to current memory.

§Safety

The offset and the length must point to valid memory.

Source

pub fn main_memory_ptr(bytes: &[u8]) -> (MemPtr, MemLength)

Source

pub fn main_memory_mut_ptr(bytes: &mut [u8]) -> (MemPtr, MemLength)

Source

pub fn early_exit_panic(early_exit: VMHooksEarlyExit) -> !

Source

pub fn breakpoint_panic(breakpoint_value: BreakpointValue) -> !

Trait Implementations§

Source§

impl Clone for ContractDebugInstanceState

Source§

fn clone(&self) -> ContractDebugInstanceState

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ContractDebugInstanceState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl InstanceState for ContractDebugInstanceState

Source§

fn get_points_used(&mut self) -> Result<u64, ExecutorError>

Returns the number of points(gas) used by the given instance.
Source§

fn set_points_used(&mut self, _points: u64) -> Result<(), ExecutorError>

Sets the number of points(gas) for the given instance.
Source§

fn memory_load_to_slice( &self, mem_ptr: MemPtr, dest: &mut [u8], ) -> Result<(), ExecutorError>

Copies data to new owned buffer.
Source§

fn memory_load_owned( &self, mem_ptr: MemPtr, mem_length: MemLength, ) -> Result<Vec<u8>, ExecutorError>

Copies data to new owned buffer.
Source§

fn memory_store( &self, mem_ptr: MemPtr, data: &[u8], ) -> Result<(), ExecutorError>

Loads data to given slice. In certain cases

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InterpretableFrom<&T> for T
where T: Clone,

Source§

fn interpret_from(from: &T, _context: &InterpreterContext) -> T

Source§

impl<T> InterpretableFrom<T> for T

Source§

fn interpret_from(from: T, _context: &InterpreterContext) -> T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ReconstructableFrom<&T> for T
where T: Clone,

Source§

impl<T> ReconstructableFrom<T> for T

Source§

fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TypeAbiFrom<TypeAbiUniversalInput<T>> for U