Struct dharitri_wasm::io::arg_de_input::ArgDecodeInput
source · pub struct ArgDecodeInput<AA>where
AA: EndpointArgumentApi + 'static,{ /* private fields */ }Expand description
Adapter from the API to the TopDecodeInput trait. Allows objects to be deserialized directly from the API as arguments.
Of course the implementation provides shortcut deserialization computation paths directly from API: into_u64, into_i64, …
This is a performance-critical struct. Since the wasm EndpointArgumentApi (ArwenApiImpl) is zero-size, it means that this structures translates to a single glorified i32 in wasm.
Implementations§
source§impl<AA> ArgDecodeInput<AA>where
AA: EndpointArgumentApi + 'static,
impl<AA> ArgDecodeInput<AA>where
AA: EndpointArgumentApi + 'static,
Trait Implementations§
source§impl<AA> DynArgInput<ArgDecodeInput<AA>> for EndpointDynArgLoader<AA>where
AA: EndpointArgumentApi + Clone + 'static,
impl<AA> DynArgInput<ArgDecodeInput<AA>> for EndpointDynArgLoader<AA>where
AA: EndpointArgumentApi + Clone + 'static,
source§fn next_arg_input(&mut self) -> ArgDecodeInput<AA>
fn next_arg_input(&mut self) -> ArgDecodeInput<AA>
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 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§impl<AA> TopDecodeInput for ArgDecodeInput<AA>where
AA: EndpointArgumentApi + 'static,
impl<AA> TopDecodeInput for ArgDecodeInput<AA>where
AA: EndpointArgumentApi + 'static,
Auto Trait Implementations§
impl<AA> RefUnwindSafe for ArgDecodeInput<AA>where
AA: RefUnwindSafe,
impl<AA> Send for ArgDecodeInput<AA>where
AA: Send,
impl<AA> Sync for ArgDecodeInput<AA>where
AA: Sync,
impl<AA> Unpin for ArgDecodeInput<AA>where
AA: Unpin,
impl<AA> UnwindSafe for ArgDecodeInput<AA>where
AA: 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