MCPcopy Create free account
hub / github.com/elastio/devx / read_no_wait

Method read_no_wait

devx-cmd/src/lib.rs:598–607  ·  view source on GitHub ↗

Same as [`Child::read()`], but doesn't wait for the process to finish and doesn't take the exit status of the process into account.

(&mut self, ostream: Ostream)

Source from the content-addressed store, hash-verified

596 /// Same as [`Child::read()`], but doesn't wait for the process to finish
597 /// and doesn't take the exit status of the process into account.
598 pub fn read_no_wait(&mut self, ostream: Ostream) -> Result<String> {
599 let mut output = String::new();
600 self.expect_ostream(ostream)
601 .read_to_string(&mut output)
602 .map_err(|err| self.io_read_err(err, ostream, "utf8"))?;
603
604 self.log_output(ostream, &format_args!("[utf8]:\n{}", output));
605
606 Ok(output)
607 }
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>> {

Callers 1

readMethod · 0.80

Calls 3

expect_ostreamMethod · 0.80
io_read_errMethod · 0.80
log_outputMethod · 0.80

Tested by

no test coverage detected