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

Method expect_ostream

devx-cmd/src/lib.rs:580–594  ·  view source on GitHub ↗
(&mut self, ostream: Ostream)

Source from the content-addressed store, hash-verified

578 }
579
580 fn expect_ostream(&mut self, ostream: Ostream) -> &mut dyn io::Read {
581 match ostream {
582 Ostream::StdOut => {
583 if let Some(ref mut it) = self.child.stdout {
584 return it;
585 }
586 }
587 Ostream::StdErr => {
588 if let Some(ref mut it) = self.child.stderr {
589 return it;
590 }
591 }
592 };
593 panic!("{} wasn't piped for {}", ostream, self);
594 }
595
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.

Callers 2

read_no_waitMethod · 0.80
read_bytes_no_waitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected