Trait SequenceStream

Source
pub trait SequenceStream: Stream + Sized {
    // Provided method
    fn sequence<F, U>(self, f: F) -> Sequence<Self, F, U>
       where F: FnOnce(Chain<Once<<Self as Stream>::Item, <Self as Stream>::Error>, Self>) -> U,
             U: Stream { ... }
}

Provided Methods§

Source

fn sequence<F, U>(self, f: F) -> Sequence<Self, F, U>
where F: FnOnce(Chain<Once<<Self as Stream>::Item, <Self as Stream>::Error>, Self>) -> U, U: Stream,

Create a Sequence stream from a stream.

Takes a transformation function which will be applied to the stream immediately before it produces a value.

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> SequenceStream for S
where S: Stream,

Implement sequence for all Streams