Struct elrond_wasm::io::BytesArgLoader
source · pub struct BytesArgLoader<A>where
A: ManagedTypeApi,{ /* private fields */ }
Expand description
Consumes a vector of BoxedBytes
and deserializes from the vector one by one.
Implementations§
source§impl<A> BytesArgLoader<A>where
A: ManagedTypeApi,
impl<A> BytesArgLoader<A>where
A: ManagedTypeApi,
pub fn new(bytes_vec: Vec<BoxedBytes>) -> Self
Trait Implementations§
source§impl<A> TopDecodeMultiInput for BytesArgLoader<A>where
A: ManagedTypeApi + ErrorApi,
impl<A> TopDecodeMultiInput for BytesArgLoader<A>where
A: ManagedTypeApi + ErrorApi,
type ValueInput = Box<[u8], Global>
source§fn next_value_input<H>(
&mut self,
h: H
) -> Result<Self::ValueInput, H::HandledErr>where
H: DecodeErrorHandler,
fn next_value_input<H>(
&mut self,
h: H
) -> Result<Self::ValueInput, H::HandledErr>where
H: DecodeErrorHandler,
Retrieves an input for deserializing an argument.
If the loader is out of arguments, it will crash by itself with an appropriate error,
without returning.
Use if the next argument is optional, use
has_next
beforehand. Read moresource§fn flush_ignore<H>(&mut self, _h: H) -> Result<(), H::HandledErr>where
H: DecodeErrorHandler,
fn flush_ignore<H>(&mut self, _h: H) -> Result<(), H::HandledErr>where
H: DecodeErrorHandler,
Consumes all inputs and ignores them.
After executing this, assert_no_more_args should not fail. Read more
fn next_value<T, H>(
&mut self,
h: H
) -> Result<T, <H as DecodeErrorHandler>::HandledErr>where
T: TopDecode,
H: DecodeErrorHandler,
source§fn assert_no_more_args<H>(
&self,
h: H
) -> Result<(), <H as DecodeErrorHandler>::HandledErr>where
H: DecodeErrorHandler,
fn assert_no_more_args<H>(
&self,
h: H
) -> Result<(), <H as DecodeErrorHandler>::HandledErr>where
H: DecodeErrorHandler,
Called after retrieving all arguments to validate that extra arguments were not provided.