pub trait EndpointArgumentApiImpl: ErrorApi + ManagedTypeApi {
// Required methods
fn get_num_arguments(&self) -> i32;
fn load_argument_managed_buffer(
&self,
arg_index: i32,
dest: Self::ManagedBufferHandle,
);
fn load_callback_closure_buffer(&self, dest: Self::ManagedBufferHandle);
// Provided methods
fn get_argument_len(&self, arg_index: i32) -> usize { ... }
fn get_argument_boxed_bytes(&self, arg_index: i32) -> BoxedBytes { ... }
fn load_argument_big_int_unsigned(
&self,
arg_index: i32,
dest: Self::BigIntHandle,
) { ... }
fn load_argument_big_int_signed(
&self,
arg_index: i32,
dest: Self::BigIntHandle,
) { ... }
fn get_argument_u64(&self, arg_index: i32) -> u64 { ... }
fn get_argument_i64(&self, arg_index: i32) -> i64 { ... }
}
Expand description
Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.
Required Methods§
fn get_num_arguments(&self) -> i32
fn load_argument_managed_buffer( &self, arg_index: i32, dest: Self::ManagedBufferHandle, )
fn load_callback_closure_buffer(&self, dest: Self::ManagedBufferHandle)
Provided Methods§
fn get_argument_len(&self, arg_index: i32) -> usize
fn get_argument_boxed_bytes(&self, arg_index: i32) -> BoxedBytes
fn load_argument_big_int_unsigned( &self, arg_index: i32, dest: Self::BigIntHandle, )
fn load_argument_big_int_signed(&self, arg_index: i32, dest: Self::BigIntHandle)
fn get_argument_u64(&self, arg_index: i32) -> u64
fn get_argument_i64(&self, arg_index: i32) -> i64
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.