Skip to main content

pipe

Function pipe 

Source
pub fn pipe(from: &EngineCommand, to: &EngineCommand) -> Result<(), EngineError>
Expand description

Runs from and to side by side with what from prints going straight into to, the way a shell’s | does: the bytes pass from one process to the other and never through QCode, so a home of any size is copied in the memory of a pipe.

Each side’s errors are read on a thread of its own, so a side that says a lot cannot stall the other on a full pipe.

§Errors

When either cannot be started, or either ends in failure: the one that failed, with what it said. When both fail, the reading side is named, because the writing side then had nothing to write.