Skip to main content

run

Function run 

Source
pub fn run(
    exec: &Exec,
    on_chunk: impl FnMut(ChildStream, &[u8]),
) -> Result<Outcome>
Expand description

Run a child to completion, draining both pipes concurrently and calling on_chunk for every chunk in arrival order.

ยงErrors

Returns the spawn failure; a child that runs and fails is an Outcome, not an error.