Skip to main content

run_with_context

Function run_with_context 

Source
pub fn run_with_context(
    reader: impl Read,
    writer: impl Write,
    stderr: &mut dyn Write,
    items: &[LineItem],
    ctx: &RunContext<'_>,
) -> Result<()>
Expand description

Full-control entry with injected stderr and explicit run context. Parse failures render a ? marker to writer; only stdin/stdout I/O failures surface as errors.

§Errors

Returns an io::Error if reading from reader or writing to writer fails. Stderr write failures are swallowed (a broken stderr pipe must not abort a valid stdout render).