pub fn read(self) -> Result<String> {
        match self.read_impl(true)? {
            BinOrUtf8::Utf8(it) => Ok(it),
            BinOrUtf8::Bin(_) => unreachable!(),
        }
    }
/// Waits for the process to finish and returns all that it has written
/// to `stdout`. Returns an error if the process has finished with
/// non-zero exit code. Expects a valid utf8 bytes sequence (since it returns
/// a Rust [`String`]), if the process is not guaranteed to output valid utf8
/// you might want to use [`ChildProcess::read_bytes`] instead.
///
/// If [`Cmd::echo_cmd`] has been set to `true` then prints captured output to
/// `stderr`.
///
/// # Panics
/// Panics if the process was spawned with non-piped `stdout`.
/// This method is expected to be used only for processes spawned via
/// [`Cmd::spawn_piped`].
///
/// [`String`]: https://doc.rust-lang.org/std/string/struct.String.html
/// [`ChildProcess::read_bytes`]: struct.ChildProcess.html#method.read_bytes
/// [`Cmd::echo_cmd`]: struct.Cmd.html#method.echo_cmd
/// [`Cmd::spawn_piped`]: struct.Cmd.html#method.spawn_piped
Waits for the process to finish and returns all that it has written
to `stdout`. Returns an error if the process has finished with
non-zero exit code. Expects a valid utf8 bytes sequence (since it returns
a Rust [`String`]), if the process is not guaranteed to output valid utf8
you might want to use [`ChildProcess::read_bytes`] instead.


Waits for the process to finish and returns all that it has written to ` stdout ` . Returns an error if the process has finished with non - zero exit code . Expects a valid utf8 bytes sequence ( since it returns a Rust [ ` String ` ] ) if the process is not guaranteed to output valid utf8 you might want to use [ ` ChildProcess :: read_bytes ` ] instead .
pub fn read(self) -> Result<String> {
        match self.read_impl(true)? {
            BinOrUtf8::Utf8(it) => Ok(it),
            BinOrUtf8::Bin(_) => unreachable!(),
        }
    }
pub fn read ( self ) -> Result < String > { match self . read_impl ( true ) ? { BinOrUtf8 :: Utf8 ( it ) => Ok ( it ) , BinOrUtf8 :: Bin ( _ ) => unreachable ! ( ) , } }
Waits for the process to finish and returns all that it has written
to `stdout`.
Waits for the process to finish and returns all that it has written to ` stdout ` .
self
self
panics
Panics if the process was spawned with non-piped `stdout`.
This method is expected to be used only for processes spawned via
[`Cmd::spawn_piped`].


Panics if the process was spawned with non - piped ` stdout ` . This method is expected to be used only for processes spawned via [ ` Cmd :: spawn_piped ` ] .