pub trait Sink: Send {
// Required methods
fn sink(&mut self, buffer: &[u8]) -> Result<(), Error>;
fn flush(self) -> Result<(), Error>;
}Expand description
Something that can write the contents of a buffer somewhere
For example, this is implemented for a file writer.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".