Skip to main content

StreamLayerExt

Trait StreamLayerExt 

Source
pub trait StreamLayerExt<T>: Stream<Item = T> + Sized
where T: 'static,
{ // Provided method fn layer<P>(self, processor: P) -> ProcessorStream<P, Self, T> where P: Processor<T> + 'static { ... } }
Expand description

Extension trait for Stream that provides convenient methods to layer up processors.

Provided Methods§

Source

fn layer<P>(self, processor: P) -> ProcessorStream<P, Self, T>
where P: Processor<T> + 'static,

Processes this stream through the provided layer.

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, T: 'static> StreamLayerExt<T> for S
where S: Stream<Item = T>,