Using clap 3 derive macros, how do I specify that at least one argument of a group must be present?

Viewed 650

I have a clap struct as follows:

#[derive(Clap)]
#[clap(
    version = "0.1.0",
    author = "..."
)]
pub struct Cli {
    #[clap(long)]
    arg_a: Option<String>,

    #[clap(long)]
    arg_b: Option<String>,

    #[clap(long)]
    arg_c: Option<String>,

    #[clap(long)]
    other_arguments: Option<usize>,
}

How do I specify that at least one of {arg_a, arg_b, arg_c} must be present, but also more can be present?

1 Answers
Related