Struct dharitri_wasm::types::CallbackClosure
source · pub struct CallbackClosure<M: ManagedTypeApi> { /* private fields */ }Implementations§
source§impl<M: ManagedTypeApi> CallbackClosure<M>
impl<M: ManagedTypeApi> CallbackClosure<M>
pub fn new(callback_name: ManagedBuffer<M>) -> Self
sourcepub fn new_empty(api: M) -> Self
pub fn new_empty(api: M) -> Self
Used by callback_raw. TODO: avoid creating any new managed buffers.
pub fn push_endpoint_arg<D: ContractCallArg>(&mut self, endpoint_arg: D)
pub fn save_to_storage<A: BlockchainApi + StorageWriteApi>(&self, api: A)
pub fn storage_load_and_clear<A: BlockchainApi + StorageReadApi + StorageWriteApi>( api: A ) -> Option<Self>
pub fn matcher<const CB_NAME_MAX_LENGTH: usize>( &self ) -> CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
pub fn into_arg_loader(self) -> ManagedResultArgLoader<M>
Trait Implementations§
source§impl<M: ManagedTypeApi> TopDecode for CallbackClosure<M>
impl<M: ManagedTypeApi> TopDecode for CallbackClosure<M>
source§fn top_decode<I: TopDecodeInput>(top_input: I) -> Result<Self, DecodeError>
fn top_decode<I: TopDecodeInput>(top_input: I) -> Result<Self, DecodeError>
Attempt to deserialize the value from input.
source§fn top_decode_or_exit<I: TopDecodeInput, ExitCtx: Clone>(
top_input: I,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> Self
fn top_decode_or_exit<I: TopDecodeInput, ExitCtx: Clone>( top_input: I, c: ExitCtx, exit: fn(_: ExitCtx, _: DecodeError) -> ! ) -> Self
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M: ManagedTypeApi> TopEncode for CallbackClosure<M>
impl<M: ManagedTypeApi> TopEncode for CallbackClosure<M>
source§fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
Attempt to serialize the value to ouput.
source§fn top_encode_or_exit<O: TopEncodeOutput, ExitCtx: Clone>(
&self,
output: O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)
fn top_encode_or_exit<O: TopEncodeOutput, ExitCtx: Clone>( &self, output: O, c: ExitCtx, exit: fn(_: ExitCtx, _: EncodeError) -> ! )
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller bytecode implementations
in cases where the application is supposed to exit directly on decode error.Auto Trait Implementations§
impl<M> RefUnwindSafe for CallbackClosure<M>where
M: RefUnwindSafe,
impl<M> Send for CallbackClosure<M>where
M: Send,
impl<M> Sync for CallbackClosure<M>where
M: Sync,
impl<M> Unpin for CallbackClosure<M>where
M: Unpin,
impl<M> UnwindSafe for CallbackClosure<M>where
M: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more