Skip to main content

twinleaf_tools/cli/
capture.rs

1use clap::{Args, ValueHint};
2use std::time::Duration;
3
4use crate::TioOpts;
5
6#[derive(Args, Debug)]
7pub struct CaptureCli {
8    #[command(flatten)]
9    pub tio: TioOpts,
10
11    /// Capture RPC name to execute
12    #[arg(default_value = "test.capture", value_hint = ValueHint::Other)]
13    pub rpc_name: String,
14
15    /// Maximum time to wait for capture data
16    #[arg(long, default_value = "5s", value_parser = humantime::parse_duration)]
17    pub timeout: Duration,
18}