Skip to main content

concat_args

Function concat_args 

Source
pub const fn concat_args<const N: usize>(
    groups: &[&[&'static Arg<'static>]],
) -> [&'static Arg<'static>; N]
Expand description

Join groups of argument tables into one, at compile time.

The positional counterpart of concat_flags — see there for why this exists. Order matters more here: an argument’s position is its identity, so a flattened group has to land exactly where the field was written.

Two functions rather than one generic: each needs a value to fill an array with before overwriting it, and there is no way to ask a type parameter for one in a const fn.