-
I have a job scheduling application where jobs (which are CLI args + an environment) are submitted to a scheduler to be executed on remote compute. Most of the apps we run are rust binaries, and so I would like to generate a CLI invocation from a derive struct (i.e., the reverse of what Clap usually does) For example, if I have #[clap(Derive)]
struct Foo {
#[clap(long)]
bar: String
#[clap(long)]
baz: String
}
let x = Foo{
bar: "1".to_string(),
baz: "2".to_string(),
} I would like to have a function (lets call it assert_eq!(x.as_invocation(), "--bar=1, --baz=2".to_string()) Is something like this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We don't support this. The issue for this is #3131 |
Beta Was this translation helpful? Give feedback.
We don't support this. The issue for this is #3131