Trait ChildExt
pub trait ChildExt {
// Required methods
fn wait_with_logging(
self,
target: &str,
stdout_level: Option<Level>,
stderr_level: Option<Level>,
) -> impl Future<Output = Result<ExitStatus>>;
fn wait_with_output_with_logging(
self,
target: &str,
stdout_level: Option<Level>,
stderr_level: Option<Level>,
) -> impl Future<Output = Result<Output>>;
}Expand description
Extensions for tokio::process::Child.
Required Methods§
fn wait_with_logging(
self,
target: &str,
stdout_level: Option<Level>,
stderr_level: Option<Level>,
) -> impl Future<Output = Result<ExitStatus>>
fn wait_with_logging( self, target: &str, stdout_level: Option<Level>, stderr_level: Option<Level>, ) -> impl Future<Output = Result<ExitStatus>>
Waits for the child process to exit while redirecting its output to
log.
stdout_level and stderr_level specify the log level to use for the
respective streams and if None, the stream will not be redirected.
The respective streams must be set to
Stdio::piped before spawning the child.
fn wait_with_output_with_logging(
self,
target: &str,
stdout_level: Option<Level>,
stderr_level: Option<Level>,
) -> impl Future<Output = Result<Output>>
fn wait_with_output_with_logging( self, target: &str, stdout_level: Option<Level>, stderr_level: Option<Level>, ) -> impl Future<Output = Result<Output>>
Waits for the child process to exit while collecting or redirecting its output.
If stdout_level or stderr_level is None, the respective stream is
collected. If a level is set to Some(_), its field in the Output
will be None.
The respective streams must be set to
Stdio::piped before spawning the child.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.