Trait OutputSink

Source
pub trait OutputSink:
    Clone
    + Debug
    + 'static {
    // Required methods
    fn write_all(&self, _buf: &[u8]);
    fn print<D: Display>(&self, _message: D);
    fn error<D: Display>(&self, _message: D);
}
Expand description

OutputSinks takes output and writes it to some destination.

Required Methods§

Source

fn write_all(&self, _buf: &[u8])

Source

fn print<D: Display>(&self, _message: D)

Source

fn error<D: Display>(&self, _message: D)

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.

Implementors§

Source§

impl OutputSink for StdioSink

impl OutputSink for BufferSink