Struct elrond_wasm::contract_base::ManagedSerializer
source · pub struct ManagedSerializer<M>where
M: ManagedTypeApi + ErrorApi + 'static,{ /* private fields */ }
Implementations§
source§impl<M> ManagedSerializer<M>where
M: ManagedTypeApi + ErrorApi + 'static,
impl<M> ManagedSerializer<M>where
M: ManagedTypeApi + ErrorApi + 'static,
pub fn new() -> Self
pub fn top_encode_to_managed_buffer<T: TopEncode>(
&self,
value: &T
) -> ManagedBuffer<M>
pub fn top_encode_to_boxed_bytes<T: TopEncode>(&self, value: &T) -> BoxedBytes
pub fn top_decode_from_managed_buffer<T: TopDecode>(
&self,
buffer: &ManagedBuffer<M>
) -> T
pub fn top_decode_from_managed_buffer_custom_message<T: TopDecode>(
&self,
buffer: &ManagedBuffer<M>,
error_message: &'static [u8]
) -> T
pub fn top_decode_from_byte_slice<T: TopDecode>(&self, slice: &[u8]) -> T
Trait Implementations§
source§impl<M> Default for ManagedSerializer<M>where
M: ManagedTypeApi + ErrorApi + 'static + Default,
impl<M> Default for ManagedSerializer<M>where
M: ManagedTypeApi + ErrorApi + 'static + Default,
source§fn default() -> ManagedSerializer<M>
fn default() -> ManagedSerializer<M>
Returns the “default value” for a type. Read more