Skip to main content

Capture

Trait Capture 

Source
pub trait Capture: Sized {
    // Required methods
    fn capture() -> Result<Self, Error>;
    fn restore(&mut self);
}
Expand description

Common trait to capture stdio and then restore

You should use Capture::capture to begin intercept and restore it via Capture::restore or Drop.

Required Methods§

Source

fn capture() -> Result<Self, Error>

Capture stdio

Source

fn restore(&mut self)

Restore stdio

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§