VMHooksHandler

Struct VMHooksHandler 

Source
pub struct VMHooksHandler<C: VMHooksContext> { /* private fields */ }
Expand description

Defines all methods that can handle VM hooks. They are spread out over several files.

Implementations§

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn is_contract_address( &mut self, address_bytes: &[u8], ) -> Result<bool, VMHooksEarlyExit>

Source

pub fn managed_caller( &mut self, dest_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_sc_address( &mut self, dest_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_owner_address( &mut self, dest_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn get_shard_of_address( &mut self, address_bytes: &[u8], ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn is_smart_contract( &mut self, address_bytes: &[u8], ) -> Result<bool, VMHooksEarlyExit>

Source

pub fn load_balance( &mut self, address_bytes: &[u8], dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn get_tx_hash(&mut self, dest: RawHandle) -> Result<(), VMHooksEarlyExit>

Source

pub fn get_gas_left(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_block_timestamp(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_block_timestamp_ms(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_block_nonce(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_block_round(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_block_epoch(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_block_random_seed( &mut self, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn get_prev_block_timestamp(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_prev_block_timestamp_ms(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_prev_block_nonce(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_prev_block_round(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_prev_block_epoch(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_epoch_start_block_timestamp_ms( &mut self, ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_epoch_start_block_nonce(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_epoch_start_block_round(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_prev_block_random_seed( &mut self, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn get_block_round_time_ms(&mut self) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_current_esdt_nft_nonce( &mut self, address_bytes: &[u8], token_id_bytes: &[u8], ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn big_int_get_esdt_external_balance( &mut self, address_bytes: &[u8], token_id_bytes: &[u8], nonce: u64, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_get_code_metadata( &mut self, address_handle: i32, response_handle: i32, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_is_builtin_function( &mut self, function_name_handle: i32, ) -> Result<bool, VMHooksEarlyExit>

Source

pub fn managed_get_esdt_token_data( &mut self, address_handle: RawHandle, token_id_handle: RawHandle, nonce: u64, value_handle: RawHandle, properties_handle: RawHandle, hash_handle: RawHandle, name_handle: RawHandle, attributes_handle: RawHandle, creator_handle: RawHandle, royalties_handle: RawHandle, uris_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_get_esdt_token_type( &mut self, _address_handle: i32, _token_id_handle: i32, nonce: i64, type_handle: i32, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_get_back_transfers( &mut self, esdt_transfer_value_handle: RawHandle, call_value_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn check_esdt_frozen( &mut self, address_handle: RawHandle, token_id_handle: RawHandle, _nonce: u64, ) -> Result<bool, VMHooksEarlyExit>

Source

pub fn get_esdt_local_roles_bits( &mut self, token_id_handle: RawHandle, ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn validate_token_identifier( &mut self, token_id_handle: RawHandle, ) -> Result<bool, VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn check_not_payable(&mut self) -> Result<(), VMHooksEarlyExit>

Source

pub fn load_egld_value( &mut self, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn load_all_esdt_transfers( &mut self, dest_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn load_all_transfers( &self, dest_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn esdt_num_transfers(&mut self) -> usize

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn sha256_managed( &mut self, dest: RawHandle, data_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn keccak256_managed( &mut self, dest: RawHandle, data_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn verify_ed25519_managed( &mut self, key: RawHandle, message: RawHandle, signature: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Should crash if the signature is invalid.

Source

pub fn verify_bls_managed( &self, _key_handle: RawHandle, _message_handle: RawHandle, _signature_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn verify_bls_aggregated_signature( &self, _key_handle: RawHandle, _message_handle: RawHandle, _signature_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn verify_bls_signature_share( &self, _key_handle: RawHandle, _message_handle: RawHandle, _signature_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

Source

pub fn get_num_arguments(&mut self) -> Result<i32, VMHooksEarlyExit>

Source

pub fn get_argument_len( &mut self, arg_index: i32, ) -> Result<usize, VMHooksEarlyExit>

Source

pub fn load_argument_managed_buffer( &mut self, arg_index: i32, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn load_argument_big_int_unsigned( &mut self, arg_index: i32, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn load_argument_big_int_signed( &mut self, arg_index: i32, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn get_argument_i64( &mut self, arg_index: i32, ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn get_argument_u64( &mut self, arg_index: i32, ) -> Result<u64, VMHooksEarlyExit>

Source

pub fn load_callback_closure_buffer( &mut self, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

Source

pub fn finish_slice_u8(&mut self, slice: &[u8]) -> Result<(), VMHooksEarlyExit>

Source

pub fn finish_big_int_raw( &mut self, handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn finish_big_uint_raw( &mut self, handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn finish_managed_buffer_raw( &mut self, handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn finish_i64(&mut self, value: i64) -> Result<(), VMHooksEarlyExit>

Source

pub fn finish_u64(&mut self, value: u64) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn signal_error(&mut self, message: &[u8]) -> Result<(), VMHooksEarlyExit>

Source

pub fn signal_error_from_buffer( &mut self, message_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn managed_write_log( &mut self, topics_handle: RawHandle, data_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn bf_from_parts( &mut self, integral_part: i32, fractional_part: i32, exponent: i32, ) -> Result<RawHandle, VMHooksEarlyExit>

Source

pub fn bf_from_frac( &mut self, numerator: i64, denominator: i64, ) -> Result<RawHandle, VMHooksEarlyExit>

Source

pub fn bf_from_sci( &mut self, significand: i64, exponent: i64, ) -> Result<RawHandle, VMHooksEarlyExit>

Source

pub fn bf_add( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_sub( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_mul( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_div( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_abs( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_neg( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_cmp( &mut self, x: RawHandle, y: RawHandle, ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn bf_sign(&mut self, x: RawHandle) -> Result<i32, VMHooksEarlyExit>

Source

pub fn bf_clone( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_sqrt( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_pow( &mut self, dest: RawHandle, x: RawHandle, exp: i32, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_floor( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_ceil( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_trunc( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_is_bi(&mut self, x: RawHandle) -> Result<bool, VMHooksEarlyExit>

Source

pub fn bf_set_i64( &mut self, dest: RawHandle, value: i64, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_set_bi( &mut self, dest: RawHandle, bi: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_get_const_pi( &mut self, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bf_get_const_e( &mut self, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Provides VM hook implementations for methods that deal big ints.

Source

pub fn bi_new(&mut self, value: i64) -> Result<RawHandle, VMHooksEarlyExit>

Source

pub fn bi_set_int64( &mut self, destination: RawHandle, value: i64, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_unsigned_byte_length( &mut self, handle: RawHandle, ) -> Result<usize, VMHooksEarlyExit>

Source

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

Source

pub fn bi_set_unsigned_bytes( &mut self, destination: RawHandle, bytes: &[u8], ) -> Result<(), VMHooksEarlyExit>

Source

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

Source

pub fn bi_set_signed_bytes( &mut self, destination: RawHandle, bytes: &[u8], ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_is_int64( &mut self, destination_handle: RawHandle, ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn bi_get_int64( &mut self, destination_handle: RawHandle, ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn bi_add( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_sub( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_mul( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_t_div( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_t_mod( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_abs( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_neg( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_sign(&mut self, x: RawHandle) -> Result<i32, VMHooksEarlyExit>

Source

pub fn bi_cmp( &mut self, x: RawHandle, y: RawHandle, ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn bi_sqrt( &mut self, dest: RawHandle, x: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_pow( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_log2(&mut self, x: RawHandle) -> Result<i32, VMHooksEarlyExit>

Source

pub fn bi_and( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_or( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_xor( &mut self, dest: RawHandle, x: RawHandle, y: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_shr( &mut self, dest: RawHandle, x: RawHandle, bits: usize, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_shl( &mut self, dest: RawHandle, x: RawHandle, bits: usize, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Provides VM hook implementations for methods that deal managed buffers.

Source

pub fn mb_new_empty(&mut self) -> Result<RawHandle, VMHooksEarlyExit>

Source

pub fn mb_new_from_bytes( &mut self, bytes: &[u8], ) -> Result<RawHandle, VMHooksEarlyExit>

Source

pub fn mb_len(&mut self, handle: RawHandle) -> Result<usize, VMHooksEarlyExit>

Source

pub fn mb_set( &mut self, handle: RawHandle, value: &[u8], ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_get_bytes( &mut self, source_handle: RawHandle, ) -> Result<Vec<u8>, VMHooksEarlyExit>

Source

pub fn mb_get_slice( &mut self, source_handle: RawHandle, starting_position: usize, slice_length: usize, result_offset: MemPtr, ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn mb_copy_slice( &mut self, source_handle: RawHandle, starting_position: usize, slice_len: usize, dest_handle: RawHandle, ) -> Result<i32, VMHooksEarlyExit>

Source

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

Source

pub fn mb_append( &mut self, accumulator_handle: RawHandle, data_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_append_bytes( &mut self, accumulator_handle: RawHandle, bytes: &[u8], ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_eq( &mut self, handle1: RawHandle, handle2: RawHandle, ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn mb_to_hex( &mut self, source_handle: RawHandle, dest_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn mm_new(&self) -> RawHandle

Source

pub fn mm_get( &self, map_handle: RawHandle, key_handle: RawHandle, out_value_handle: RawHandle, )

Source

pub fn mm_put( &self, map_handle: RawHandle, key_handle: RawHandle, value_handle: RawHandle, )

Source

pub fn mm_remove( &self, map_handle: RawHandle, key_handle: RawHandle, out_value_handle: RawHandle, )

Source

pub fn mm_contains(&self, map_handle: RawHandle, key_handle: RawHandle) -> bool

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Provides VM hook implementations for methods that deal with more than one type of managed type.

It is also the trait that unifies all managed type functionality.

Source

pub fn mb_to_big_int_unsigned( &mut self, buffer_handle: RawHandle, bi_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_to_big_int_signed( &mut self, buffer_handle: RawHandle, bi_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_from_big_int_unsigned( &mut self, buffer_handle: RawHandle, bi_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_from_big_int_signed( &mut self, buffer_handle: RawHandle, bi_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_to_small_int_unsigned( &self, buffer_handle: RawHandle, ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn mb_to_small_int_signed( &self, buffer_handle: RawHandle, ) -> Result<i64, VMHooksEarlyExit>

Source

pub fn mb_from_small_int_unsigned( &self, buffer_handle: RawHandle, value: u64, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_from_small_int_signed( &self, buffer_handle: RawHandle, value: i64, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn bi_to_string( &mut self, bi_handle: RawHandle, str_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn mb_set_random( &mut self, dest_handle: RawHandle, length: usize, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn transfer_value_execute( &mut self, to_handle: RawHandle, amount_handle: RawHandle, _gas_limit: u64, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn multi_transfer_esdt_nft_execute( &mut self, to_handle: RawHandle, payments_handle: RawHandle, gas_limit: u64, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn managed_multi_transfer_esdt_nft_execute_with_return( &mut self, to_handle: i32, payments_handle: i32, gas_limit: u64, function_handle: i32, arguments_handle: i32, ) -> Result<i32, VMHooksEarlyExit>

Source

pub fn async_call_raw( &mut self, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn create_async_call_raw( &mut self, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, success_callback: &[u8], error_callback: &[u8], _gas: u64, _extra_gas_for_callback: u64, callback_closure_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn deploy_contract( &mut self, _gas: u64, egld_value_handle: RawHandle, code_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, new_address_handle: RawHandle, result_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn deploy_from_source_contract( &mut self, _gas: u64, egld_value_handle: RawHandle, source_contract_address_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, new_address_handle: RawHandle, result_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn upgrade_from_source_contract( &mut self, sc_address_handle: RawHandle, _gas: u64, egld_value_handle: RawHandle, source_contract_address_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn upgrade_contract( &mut self, sc_address_handle: RawHandle, _gas: u64, egld_value_handle: RawHandle, code_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn execute_on_dest_context_raw( &mut self, _gas: u64, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, result_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn execute_on_dest_context_readonly_raw( &mut self, _gas: u64, to_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, result_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn clean_return_data(&mut self) -> Result<(), VMHooksEarlyExit>

Source

pub fn delete_from_return_data( &mut self, index: usize, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn storage_load_managed_buffer_raw( &mut self, key_handle: RawHandle, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn storage_load_from_address( &mut self, address_handle: RawHandle, key_handle: RawHandle, dest: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source

pub fn storage_store_managed_buffer_raw( &mut self, key_handle: RawHandle, value_handle: RawHandle, ) -> Result<(), VMHooksEarlyExit>

Source§

impl<C: VMHooksContext> VMHooksHandler<C>

Source

pub fn new(context: C) -> Self

Trait Implementations§

Source§

impl<C: Debug + VMHooksContext> Debug for VMHooksHandler<C>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C> Freeze for VMHooksHandler<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for VMHooksHandler<C>
where C: RefUnwindSafe,

§

impl<C> Send for VMHooksHandler<C>
where C: Send,

§

impl<C> Sync for VMHooksHandler<C>
where C: Sync,

§

impl<C> Unpin for VMHooksHandler<C>
where C: Unpin,

§

impl<C> UnwindSafe for VMHooksHandler<C>
where C: UnwindSafe,

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.