Skip to main content

EchoSink

Trait EchoSink 

Source
pub trait EchoSink: Send + Sync {
    // Required method
    fn echo(&self, stream: OutputStream, bytes: &[u8]) -> Result<()>;
}
Expand description

Where live output goes when a request asks for echo.

The tracer calls EchoSink::echo with each chunk as it arrives, in order, and only when RunRequest::echo is set. Tests observe echo by implementing this trait.

Required Methods§

Source

fn echo(&self, stream: OutputStream, bytes: &[u8]) -> Result<()>

Echo one chunk of output.

§Errors

Returns the error of the underlying write. A failed echo never fails the run, and the captured output stays complete.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§