Skip to main content

ChildOutConfig

Trait ChildOutConfig 

Source
pub trait ChildOutConfig: Send + 'static {
    type Task: ChildOutTask;

    // Required methods
    fn configure_stdout(&mut self, command: &mut TokioCommand);
    fn configure_stderr(&mut self, command: &mut TokioCommand);
    fn take(
        self,
        child: &mut TokioChild,
        name: Option<&str>,
        is_out: bool,
    ) -> Result<Self::Task>;
}
Available on crate feature process only.
Expand description

Configuration for process output to be used with Command::stdout and Command::stderr

This is essentially a marker, that is used to create tasks when spawning the child to drive the IO. See ChildOutTask.

See module documentation for list of available configs

Required Associated Types§

Required Methods§

Source

fn configure_stdout(&mut self, command: &mut TokioCommand)

Configure the standard output using this config, called before spawning

Source

fn configure_stderr(&mut self, command: &mut TokioCommand)

Configure the standard error using this config, called before spawning

Source

fn take( self, child: &mut TokioChild, name: Option<&str>, is_out: bool, ) -> Result<Self::Task>

Take the bits needed for this out config from the child

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§