Trait CanMapStream

Source
pub trait CanMapStream: HasStreamType {
    // Required method
    fn map_stream<T, U, M>(
        stream: Self::Stream<T>,
        mapper: M,
    ) -> Self::Stream<U>
       where T: Async,
             U: Async,
             M: Fn(T) -> U + Async;
}

Required Methods§

Source

fn map_stream<T, U, M>(stream: Self::Stream<T>, mapper: M) -> Self::Stream<U>
where T: Async, U: Async, M: Fn(T) -> U + Async,

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<Runtime> CanMapStream for Runtime
where Runtime: HasStreamType + HasComponents, Runtime::Components: StreamMapper<Runtime>,