Skip to main content

run_from_args

Function run_from_args 

Source
pub async fn run_from_args<I, T>(argv: I) -> i32
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Expand description

Run the tool from an argv-style iterator, returning its exit code.

0 means the broker accepted the request. 1 means it refused one, and the reason is on stderr. 2 means the broker could not be reached, so nothing is known about the outcome. 3 means a cut does not match the log.

ยงPanics

Panics if argv does not parse, which for a caller passing a literal argument list is a bug in that list rather than a runtime condition.