Function pacaptr::exec::exec_tee

source ·
async fn exec_tee(
    src: impl Stream<Item = Result<Bytes>> + Send,
    out: Option<impl AsyncWrite + Send>
) -> Result<Vec<u8>>
Expand description

Takes contents from an input stream and copy to an output stream (optional) and a Vec<u8>, then returns the Vec<u8>.

Helper to implement Cmd::exec_checkerr and Cmd::exec_checkall.

§Arguments

  • src - The input stream to read from.
  • out - The optional output stream to write to.