Same as [`Child::read_no_wait()`], but reads raw bytes.
(&mut self, ostream: Ostream)
| 608 | |
| 609 | /// Same as [`Child::read_no_wait()`], but reads raw bytes. |
| 610 | pub fn read_bytes_no_wait(&mut self, ostream: Ostream) -> Result<Vec<u8>> { |
| 611 | let mut output = Vec::new(); |
| 612 | self.expect_ostream(ostream) |
| 613 | .read_to_end(&mut output) |
| 614 | .map_err(|err| self.io_read_err(err, ostream, "bytes"))?; |
| 615 | |
| 616 | self.log_output(ostream, &format_args!("[bytes]:\n{:?}", output)); |
| 617 | |
| 618 | Ok(output) |
| 619 | } |
| 620 | |
| 621 | fn io_read_err(&self, err: io::Error, ostream: Ostream, data_kind: &str) -> Error { |
| 622 | Error::proc( |
no test coverage detected