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]>
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.Source§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.
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.
Auto Trait Implementations§
impl<A> Freeze for BytesArgLoader<A>
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