Skip to main content

OutputSink

Type Alias OutputSink 

Source
pub type OutputSink<'sink> = dyn Fn(OutputStream, &[u8]) + Send + Sync + 'sink;
Expand description

Receives every output line while a process runs.

The slice holds the line as the child wrote it, with the trailing newline when the child wrote one. The sink runs on the reader threads, so it must work when two threads call it at the same time.