multiversx_sc_scenario::debug_executor

Struct ContractContainerRef

Source
pub struct ContractContainerRef(/* private fields */);

Implementations§

Source§

impl ContractContainerRef

Source

pub fn new(contract_container: ContractContainer) -> Self

Trait Implementations§

Source§

impl Clone for ContractContainerRef

Source§

fn clone(&self) -> ContractContainerRef

Returns a copy 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 Instance for ContractContainerRef

Source§

fn call(&self, func_name: &str) -> Result<(), String>

Calls an exported function of a WebAssembly instance by name.
Source§

fn check_signatures(&self) -> bool

Checks that all public module functions (SC endpoints) have no arguments or results.
Source§

fn has_function(&self, func_name: &str) -> bool

Checks whether SC has an endpoint with given name.
Source§

fn get_exported_function_names(&self) -> Vec<String>

Required to be able to extract all SC endpoint names.
Source§

fn set_points_limit(&self, _limit: u64) -> Result<(), String>

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

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

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

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

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

fn memory_length(&self) -> Result<u64, String>

Gets the size in bytes of the memory data.
Source§

fn memory_ptr(&self) -> Result<*mut u8, String>

Gets a pointer to the beginning of the contiguous memory data bytes.
Source§

fn memory_load( &self, _mem_ptr: MemPtr, _mem_length: MemLength, ) -> Result<&[u8], ExecutorError>

Loads data from executor memory.
Source§

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

Loads data from executor memory.
Source§

fn memory_grow(&self, _by_num_pages: u32) -> Result<u32, ExecutorError>

Grows a memory by the given number of pages (of 65Kb each).
Source§

fn set_breakpoint_value(&self, _value: BreakpointValue) -> Result<(), String>

Sets the runtime breakpoint value for the given instance.
Source§

fn get_breakpoint_value(&self) -> Result<BreakpointValue, String>

Returns the runtime breakpoint value from the given instance.
Source§

fn reset(&self) -> Result<(), String>

Resets an instance, cleaning memories and globals.
Source§

fn cache(&self) -> Result<Vec<u8>, String>

Caches an instance.

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V