Trait dencode::IterSink [−][src]
pub trait IterSink<Item> { type Error; 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.
Associated Types
Required methods
fn ready(&mut self) -> Result<(), Self::Error>
[src]
Expand description
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
.
fn start_send(&mut self, item: Item) -> Result<(), Self::Error>
[src]
Expand description
Write a value to the internal buffer.
Each call to this function must be preceded by a successful call to ready
.
fn flush(&mut self) -> Result<(), Self::Error>
[src]
Expand description
Flush any remaining output from this sink’s internal buffer.
Implementors
impl<T, E, I> IterSink<I> for FramedWrite<T, E> where
T: Write,
E: Encoder<I>,
[src]
impl<T, E, I> IterSink<I> for FramedWrite<T, E> where
T: Write,
E: Encoder<I>,
[src]