Skip to main content

OutputCapture

Trait OutputCapture 

Source
pub trait OutputCapture: Send + Sync {
    // Required methods
    fn get_stdout<'life0, 'async_trait>(
        &'life0 self,
        pid: u32,
    ) -> Pin<Box<dyn Future<Output = Layer3Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_stderr<'life0, 'async_trait>(
        &'life0 self,
        pid: u32,
    ) -> Pin<Box<dyn Future<Output = Layer3Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stream_output<'life0, 'async_trait>(
        &'life0 self,
        pid: u32,
    ) -> Pin<Box<dyn Future<Output = Layer3Result<ProcessOutputStream>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

进程输出捕获 trait

Required Methods§

Source

fn get_stdout<'life0, 'async_trait>( &'life0 self, pid: u32, ) -> Pin<Box<dyn Future<Output = Layer3Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取进程 stdout

Source

fn get_stderr<'life0, 'async_trait>( &'life0 self, pid: u32, ) -> Pin<Box<dyn Future<Output = Layer3Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取进程 stderr

Source

fn stream_output<'life0, 'async_trait>( &'life0 self, pid: u32, ) -> Pin<Box<dyn Future<Output = Layer3Result<ProcessOutputStream>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

流式读取输出

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§