Skip to main content

ArgNestedTuple

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: TopDecodeMultiInput>(
        loader: L,
        arg_names: Self::ArgNames,
    ) -> Self;
}
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: TopDecodeMultiInput>( 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".

Implementations on Foreign Types§

Source§

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

Source§

type ArgNames = (&'static str, <Tail as ArgNestedTuple<AA>>::ArgNames)

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: TopDecodeMultiInput>( loader: L, arg_names: Self::ArgNames, ) -> Self

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: Self::ArgNames) -> Self

Source§

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

Implementors§