Struct dharitri_wasm::io::BytesArgLoader
source · pub struct BytesArgLoader<A>where
A: ManagedTypeApi + ErrorApi,{ /* 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 + ErrorApi,
impl<A> BytesArgLoader<A>where
A: ManagedTypeApi + ErrorApi,
pub fn new(api: A, bytes_vec: Vec<BoxedBytes>) -> Self
Trait Implementations§
source§impl<A> DynArgInput for BytesArgLoader<A>where
A: ManagedTypeApi + ErrorApi,
impl<A> DynArgInput for BytesArgLoader<A>where
A: ManagedTypeApi + ErrorApi,
type ItemInput = ManagedBytesTopDecodeInput<A>
type ErrorApi = A
fn dyn_arg_vm_api(&self) -> Self::ErrorApi
source§fn next_arg_input(&mut self) -> ManagedBytesTopDecodeInput<A>
fn next_arg_input(&mut self) -> ManagedBytesTopDecodeInput<A>
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.fn vm_api_cast<CastApi: Clone + 'static>(&self) -> CastApi
source§fn assert_no_more_args(&self)
fn assert_no_more_args(&self)
Called after retrieving all arguments to validate that extra arguments were not provided.
source§fn flush_ignore(&mut self)
fn flush_ignore(&mut self)
Consumes all inputs and ignores them.
After executing this, assert_no_more_args should not fail.
Auto Trait Implementations§
impl<A> RefUnwindSafe for BytesArgLoader<A>where
A: RefUnwindSafe,
impl<A> Send for BytesArgLoader<A>where
A: Send,
impl<A> Sync for BytesArgLoader<A>where
A: Sync,
impl<A> Unpin for BytesArgLoader<A>where
A: Unpin,
impl<A> UnwindSafe for BytesArgLoader<A>where
A: 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