pub trait Pipe<Input> {
type Output;
// Required method
fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
stream: Pin<&mut impl Stream<Item = Input>>,
) -> Poll<Option<Self::Output>>;
// Provided methods
fn pipe<P>(self, pipe: P) -> PipePipe<Self, P>
where P: Pipe<Self::Output>,
Self: Sized { ... }
fn sink<S>(self, sink: S) -> PipeSink<Self, S>
where S: Sink<Self::Output>,
Self: Sized { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
where F: FnMut(&Self::Output) -> bool,
Self: Sized { ... }
fn flat_map<F, R>(self, f: F) -> FlatMap<Self, F, R>
where F: FnMut(Self::Output) -> R,
R: Stream,
Self: Sized { ... }
fn flatten(self) -> Flatten<Self, Self::Output>
where Self::Output: Stream,
Self: Sized { ... }
fn map<F, R>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Output) -> R,
Self: Sized { ... }
}Required Associated Types§
Required Methods§
fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, stream: Pin<&mut impl Stream<Item = Input>>, ) -> Poll<Option<Self::Output>>
Provided Methods§
fn pipe<P>(self, pipe: P) -> PipePipe<Self, P>
fn sink<S>(self, sink: S) -> PipeSink<Self, S>
fn filter<F>(self, f: F) -> Filter<Self, F>
fn flat_map<F, R>(self, f: F) -> FlatMap<Self, F, R>
fn flatten(self) -> Flatten<Self, Self::Output>
fn map<F, R>(self, f: F) -> Map<Self, F>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".