pub trait IterSink<Item> {
type Error;
// Required methods
fn ready(&mut self) -> Result<(), Self::Error>;
fn start_send(&mut self, item: Item) -> Result<(), Self::Error>;
fn flush(&mut self) -> Result<(), Self::Error>;
}Expand description
An IterSink is a value into which other values can be sent.
Values are sent in two phases: first by internally buffering the value, and then actually writing the value upon flushing.
Required Associated Types§
Required Methods§
Sourcefn ready(&mut self) -> Result<(), Self::Error>
fn ready(&mut self) -> Result<(), Self::Error>
Attempts to prepare the IterSink to receive a value, adjusting the internal
buffer if necessary.
This method must be called prior to each call to start_send.
Sourcefn start_send(&mut self, item: Item) -> Result<(), Self::Error>
fn start_send(&mut self, item: Item) -> Result<(), Self::Error>
Write a value to the internal buffer.
Each call to this function must be preceded by a successful call to ready.