Skip to main content

run_from_args

Function run_from_args 

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

Parse the given argv (including program name as first element) and run.

Enables tests and embedders to inject argv without mutating process-global state. Stdin/stdout/stderr remain the process streams (Unix pipes / agent contract); full stream injection is reserved for unit tests of output.

ยงReturns

Process ExitCode mapped from sysexits-style CLI codes.