Skip to main content

run_main_from_args

Function run_main_from_args 

Source
pub fn run_main_from_args<R, W1, W2>(
    args: &[String],
    is_tty: bool,
    stdin: &mut R,
    stdout: &mut W1,
    stderr: &mut W2,
) -> Result<(), Box<dyn Error>>
where R: BufRead + Read, W1: Write, W2: Write,
Expand description

Same as run_main but takes args, is_tty, and streams (for tests and callers that supply I/O).

ยงErrors

Returns an error if usage is wrong or I/O fails critically.