multiversx_sc_snippets::imports

Trait ArgNestedTuple

Source
pub trait ArgNestedTuple<AA>{
    type ArgNames;

    // Required methods
    fn check_num_single_args(index: i32);
    fn next_single_arg(index: i32, arg_names: Self::ArgNames) -> Self;
    fn next_multi_arg<L>(loader: L, arg_names: Self::ArgNames) -> Self
       where L: TopDecodeMultiInput;
}
Expand description

Models an argument tree of the form (arg1, (arg2, ... (argn, ()))), used for retrieving endpoint arguments.

It translates to a small algorithm determined at compile-time. That is why all methods are inlined.

Required Associated Types§

Required Methods§

Source

fn check_num_single_args(index: i32)

Source

fn next_single_arg(index: i32, arg_names: Self::ArgNames) -> Self

Source

fn next_multi_arg<L>(loader: L, arg_names: Self::ArgNames) -> Self

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.

Implementations on Foreign Types§

Source§

impl<AA> ArgNestedTuple<AA> for ()

Source§

type ArgNames = ()

Source§

fn check_num_single_args(index: i32)

Source§

fn next_single_arg( _index: i32, _arg_names: <() as ArgNestedTuple<AA>>::ArgNames, )

Source§

fn next_multi_arg<L>( loader: L, _arg_names: <() as ArgNestedTuple<AA>>::ArgNames, )

Source§

impl<AA, Head, Tail> ArgNestedTuple<AA> for (Head, Tail)

Implementors§