/// Wait for the component to terminate and return its exit status, stdout, and stderr.
Wait for the component to terminate and return its exit status, stdout, and stderr.
Wait for the component to terminate and return its exit status stdout and stderr .
pub fn wait_with_output(mut self) -> impl Future<Output = Result<Output, Error>> {
        let drain = |pipe: Option<fasync::Socket>| match pipe {
            None => future::ready(Ok(vec![])).left_future(),
            Some(pipe) => pipe
                .take_while(|maybe_result| {
                    future::ready(match maybe_result {
                        Err(zx::Status::PEER_CLOSED) => false,
                        _ => true,
                    })
                })
                .try_concat()
                .map_err(|err| err.into())
                .right_future(),
        };
        future::try_join3(self.wait(), drain(self.stdout), drain(self.stderr))
            .map_ok(|(exit_status, stdout, stderr)| Output { exit_status, stdout, stderr })
    }
pub fn wait_with_output ( mut self ) -> impl Future < Output = Result < Output , Error > > { let drain = | pipe : Option < fasync :: Socket > | match pipe { None => future :: ready ( Ok ( vec ! [ ] ) ) . left_future ( ) , Some ( pipe ) => pipe . take_while ( | maybe_result | { future :: ready ( match maybe_result { Err ( zx :: Status :: PEER_CLOSED ) => false , _ => true , } ) } ) . try_concat ( ) . map_err ( | err | err . into ( ) ) . right_future ( ) , } ; future :: try_join3 ( self . wait ( ) , drain ( self . stdout ) , drain ( self . stderr ) ) . map_ok ( | ( exit_status , stdout , stderr ) | Output { exit_status , stdout , stderr } ) }
Wait for the component to terminate and return its exit status, stdout, and stderr.
Wait for the component to terminate and return its exit status stdout and stderr .
mut self