pub trait TopDecodeMultiInput: Sized {
type ValueInput: TopDecodeInput;
// Required methods
fn has_next(&self) -> bool;
fn next_value_input<H>(
&mut self,
h: H,
) -> Result<Self::ValueInput, H::HandledErr>
where H: DecodeErrorHandler;
// Provided methods
fn next_value<T, H>(&mut self, h: H) -> Result<T, H::HandledErr>
where T: TopDecode,
H: DecodeErrorHandler { ... }
fn assert_no_more_args<H>(&self, h: H) -> Result<(), H::HandledErr>
where H: DecodeErrorHandler { ... }
fn flush_ignore<H>(&mut self, h: H) -> Result<(), H::HandledErr>
where H: DecodeErrorHandler { ... }
}
Required Associated Types§
Required Methods§
Sourcefn 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.
Provided Methods§
fn next_value<T, H>(&mut self, h: H) -> Result<T, H::HandledErr>where
T: TopDecode,
H: DecodeErrorHandler,
Sourcefn assert_no_more_args<H>(&self, h: H) -> Result<(), H::HandledErr>where
H: DecodeErrorHandler,
fn assert_no_more_args<H>(&self, h: H) -> Result<(), H::HandledErr>where
H: DecodeErrorHandler,
Called after retrieving all arguments to validate that extra arguments were not provided.
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.