Trait futures_concurrency::stream::IntoStream

source ·
pub trait IntoStream {
    type Item;
    type IntoStream: Stream<Item = Self::Item>;

    // Required method
    fn into_stream(self) -> Self::IntoStream;
}
Expand description

Conversion into a Stream.

By implementing IntoStream for a type, you define how it will be converted to an iterator. This is common for types which describe a collection of some kind.

Required Associated Types§

source

type Item

The type of the elements being iterated over.

source

type IntoStream: Stream<Item = Self::Item>

Which kind of stream are we turning this into?

Required Methods§

source

fn into_stream(self) -> Self::IntoStream

Creates a stream from a value.

Implementors§

source§

impl<S: Stream> IntoStream for S

§

type Item = <S as Stream>::Item

§

type IntoStream = S