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

Method read_bytes_no_wait

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

Same as [`Child::read_no_wait()`], but reads raw bytes.

(&mut self, ostream: Ostream)

Source from the content-addressed store, hash-verified

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(

Callers 1

read_bytesMethod · 0.80

Calls 3

expect_ostreamMethod · 0.80
io_read_errMethod · 0.80
log_outputMethod · 0.80

Tested by

no test coverage detected