Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rust 使用clap 3派生宏,如何指定组中至少必须存在一个参数?_Rust_Clap - Fatal编程技术网

Rust 使用clap 3派生宏,如何指定组中至少必须存在一个参数?

Rust 使用clap 3派生宏,如何指定组中至少必须存在一个参数?,rust,clap,Rust,Clap,我有一个clap结构,如下所示: #[派生(Clap)] #[鼓掌( version=“0.1.0”, author=“…” )] 发布结构Cli{ #[鼓掌(长)] arg_a:选项, #[鼓掌(长)] arg_b:选项, #[鼓掌(长)] arg_c:选项, #[鼓掌(长)] 其他参数:选项, } 如何指定必须至少存在{arg_a,arg_b,arg_c}中的一个,但也可以存在更多

我有一个clap结构,如下所示:

#[派生(Clap)]
#[鼓掌(
version=“0.1.0”,
author=“…”
)]
发布结构Cli{
#[鼓掌(长)]
arg_a:选项,
#[鼓掌(长)]
arg_b:选项,
#[鼓掌(长)]
arg_c:选项,
#[鼓掌(长)]
其他参数:选项,
}
如何指定必须至少存在
{arg_a,arg_b,arg_c}
中的一个,但也可以存在更多