pub struct Cli {Show 22 fields
pub question: Option<String>,
pub cmd: Option<String>,
pub stdin: Option<String>,
pub mode: Option<Mode>,
pub timeout: Option<f64>,
pub heartbeat: HeartbeatOpts,
pub err_match: Option<String>,
pub err_match_stdout: Option<String>,
pub err_match_stderr: Option<String>,
pub ok_match: Option<String>,
pub ok_match_stdout: Option<String>,
pub ok_match_stderr: Option<String>,
pub otherwise: Option<Otherwise>,
pub focus: Option<String>,
pub context: usize,
pub capture_tail: Option<usize>,
pub emit: Option<String>,
pub emit_stderr: Option<String>,
pub show_output: bool,
pub quiet: bool,
pub explain: Option<Format>,
pub args: Vec<String>,
}Fields§
§question: Option<String>Question this experiment answers; printed as a “== … ==” banner.
cmd: Option<String>Program to run (must be on the fixed read-only allowlist).
stdin: Option<String>Text written to the child’s standard input. Accepts file:PATH / text:VALUE payloads.
mode: Option<Mode>Pin how matcher patterns are interpreted (promotion off): literal, glob, or regex.
timeout: Option<f64>Kill the command and classify ERROR if it runs longer than SECS seconds (fractional allowed); {CODE} becomes “timeout”.
heartbeat: HeartbeatOpts§err_match: Option<String>Match in stdout OR stderr forces ERROR (synonym for the -stdout/-stderr pair).
err_match_stdout: Option<String>Match in stdout forces ERROR.
err_match_stderr: Option<String>Match in stderr forces ERROR.
ok_match: Option<String>Match in stdout OR stderr indicates SUCCESS (synonym for the -stdout/-stderr pair).
ok_match_stdout: Option<String>Match in stdout indicates SUCCESS.
ok_match_stderr: Option<String>Match in stderr indicates SUCCESS.
otherwise: Option<Otherwise>Verdict when neither an –ok-match nor an –err-match matched: success, error, or exit (follow the exit code). Default: error if any –ok-match was given, else exit.
focus: Option<String>Distil captured output to lines matching this pattern (with –context around each), printed to stderr and available as {FOCUS}.
context: usizeLines of context shown around each –focus match.
capture_tail: Option<usize>Keep only the last N lines of each captured stream in the {STDOUT}/{STDERR} emit tokens (matchers and –focus still see everything).
emit: Option<String>Template written to stdout after running. Tokens: {RESULT} {CODE} {QUESTION} {CMD} {STDOUT} {STDERR} {REASON} {FOCUS}.
emit_stderr: Option<String>Template written to stderr after running (same tokens as –emit).
show_output: boolAlso pass the child’s stdout/stderr through verbatim.
quiet: boolSuppress the question banner.
explain: Option<Format>Print agent usage docs (md or json) and exit.
args: Vec<String>Arguments passed through to –cmd (after --).
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.