Skip to main content

Args

Derive Macro Args 

Source
#[derive(Args)]
{
    // Attributes available to this derive:
    #[usage]
    #[command]
    #[arg]
    #[value]
    #[group]
}
Expand description

Compile a struct into one subcommand’s flags and arguments.

Used on the struct a Subcommands variant wraps. It generates the same tables and metadata as Cli, minus the program-level parts a subcommand does not have — a name, a version, an entry point — plus the trait a parent uses to route events into it.