StreamBufferExt

Trait StreamBufferExt 

Source
pub trait StreamBufferExt:
    Stream<Item = String>
    + Sized
    + Unpin {
    // Provided methods
    fn with_buffer(self, config: BufferConfig) -> BufferedStream<Self> { ... }
    fn with_buffer_default(self) -> BufferedStream<Self> { ... }
}
Expand description

Extension trait for streams to add buffering

Provided Methods§

Source

fn with_buffer(self, config: BufferConfig) -> BufferedStream<Self>

Add buffering to the stream

Source

fn with_buffer_default(self) -> BufferedStream<Self>

Add buffering with default configuration

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<S> StreamBufferExt for S
where S: Stream<Item = String> + Unpin,