multiversx_chain_vm::tx_mock

Struct TxManagedTypes

Source
pub struct TxManagedTypes { /* private fields */ }

Implementations§

Source§

impl TxManagedTypes

Source

pub fn bf_get_f64(&self, handle: RawHandle) -> f64

Source

pub fn bf_overwrite(&mut self, handle: RawHandle, value: f64)

Source§

impl TxManagedTypes

Source

pub fn bi_new_from_big_int(&mut self, value: BigInt) -> RawHandle

Source

pub fn bi_overwrite(&mut self, destination: RawHandle, value: BigInt)

Source

pub fn bi_get(&self, handle: RawHandle) -> BigInt

Source

pub fn bu_get(&self, handle: RawHandle) -> BigUint

Source

pub fn bi_to_i64(&self, handle: RawHandle) -> Option<i64>

Source

pub fn bi_get_unsigned_bytes(&self, handle: RawHandle) -> Vec<u8>

Source

pub fn bi_set_unsigned_bytes(&mut self, destination: RawHandle, bytes: &[u8])

Source

pub fn bi_get_signed_bytes(&self, handle: RawHandle) -> Vec<u8>

Source

pub fn bi_set_signed_bytes(&mut self, destination: RawHandle, bytes: &[u8])

Source§

impl TxManagedTypes

Source

pub fn mb_get(&self, handle: RawHandle) -> &[u8]

Source

pub fn mb_len(&self, handle: RawHandle) -> usize

Source

pub fn mb_to_bytes(&self, handle: RawHandle) -> Vec<u8>

Source

pub fn mb_to_address(&self, handle: RawHandle) -> VMAddress

Source

pub fn mb_to_function_name(&self, handle: RawHandle) -> TxFunctionName

Source

pub fn mb_to_code_metadata(&self, handle: RawHandle) -> VMCodeMetadata

Source

pub fn mb_get_slice( &self, source_handle: RawHandle, starting_position: usize, slice_len: usize, ) -> Result<Vec<u8>, InvalidSliceError>

Source

pub fn mb_load_slice( &self, source_handle: RawHandle, starting_position: usize, dest_slice: &mut [u8], ) -> Result<(), InvalidSliceError>

Source

pub fn mb_set(&mut self, handle: RawHandle, value: Vec<u8>)

Source

pub fn mb_new(&mut self, value: Vec<u8>) -> RawHandle

Source

pub fn mb_update<R, F: FnOnce(&mut Vec<u8>) -> R>( &mut self, handle: RawHandle, f: F, ) -> R

Source

pub fn mb_set_slice( &mut self, dest_handle: RawHandle, starting_position: usize, source_slice: &[u8], ) -> Result<(), InvalidSliceError>

Source

pub fn mb_append_bytes(&mut self, accumulator_handle: RawHandle, bytes: &[u8])

Source

pub fn mb_get_vec_of_bytes(&self, source_handle: RawHandle) -> Vec<Vec<u8>>

Retrieves data saved in the format of a ManagedVec, i.e. the main data structure encodes the handles of other buffers.

Source

pub fn mb_set_vec_of_bytes( &mut self, destination_handle: RawHandle, data: Vec<Vec<u8>>, )

Creates the underlying structure of a ManagedVec from memory..

Source

pub fn mb_get_vec_of_esdt_payments( &self, source_handle: RawHandle, ) -> Vec<TxTokenTransfer>

Source

pub fn mb_set_vec_of_esdt_payments( &mut self, dest_handle: RawHandle, transfers: &[TxTokenTransfer], )

Source§

impl TxManagedTypes

Source

pub fn mm_new(&mut self) -> RawHandle

Source

pub fn mm_values_insert( &mut self, map_handle: RawHandle, key: Vec<u8>, value: Vec<u8>, )

Source

pub fn mm_values_get(&self, map_handle: RawHandle, key: &[u8]) -> Vec<u8>

Source

pub fn mm_contains(&self, map_handle: RawHandle, key: &[u8]) -> bool

Source

pub fn mm_values_remove(&mut self, map_handle: RawHandle, key: &[u8]) -> Vec<u8>

Source§

impl TxManagedTypes

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Debug for TxManagedTypes

Source§

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

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

impl Default for TxManagedTypes

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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.