serde style defaults

This commit is contained in:
Aiden McClelland
2022-08-01 09:57:53 -06:00
parent 8b183175db
commit 9351e89240
4 changed files with 32 additions and 9 deletions

View File

@@ -53,7 +53,7 @@ async fn dothething<
#[context] _ctx: AppState,
#[arg(short = 'a')] arg1: Option<String>,
#[arg(short = 'b')] val: String,
#[arg(short = 'c', help = "I am the flag `c`!")] arg3: bool,
#[arg(short = 'c', help = "I am the flag `c`!", default)] arg3: bool,
#[arg(stdin)] structured: U,
) -> Result<(Option<String>, String, bool, U), RpcError> {
Ok((arg1, val, arg3, structured))