Struct futures_state_stream::FromStream
[−]
[src]
pub struct FromStream<S, T>(_, _);
A StateStream
yielding elements of a normal `Stream.
Trait Implementations
impl<S, T> StateStream for FromStream<S, T> where
S: Stream,
[src]
S: Stream,
type Item = S::Item
The items being streamed.
type State = T
The state returned when streaming completes.
type Error = S::Error
The error returned.
fn poll(&mut self) -> Poll<StreamEvent<S::Item, T>, (S::Error, T)>
[src]
Similar to Stream::poll
. Read more
fn into_future(self) -> IntoFuture<Self> where
Self: Sized,
[src]
Self: Sized,
Returns a future which yields the next element of the stream.
fn into_stream(self) -> IntoStream<Self> where
Self: Sized,
[src]
Self: Sized,
Returns a normal Stream
which yields the elements of this stream and discards the state.
fn map<F, B>(self, f: F) -> Map<Self, F> where
Self: Sized,
F: FnMut(Self::Item) -> B,
[src]
Self: Sized,
F: FnMut(Self::Item) -> B,
Returns a stream which applies a transform to items of this stream.
fn map_err<F, B>(self, f: F) -> MapErr<Self, F> where
Self: Sized,
F: FnMut(Self::Error) -> B,
[src]
Self: Sized,
F: FnMut(Self::Error) -> B,
Returns a stream which applies a transform to errors of this stream.
fn map_state<F, B>(self, f: F) -> MapState<Self, F> where
Self: Sized,
F: FnOnce(Self::State) -> B,
[src]
Self: Sized,
F: FnOnce(Self::State) -> B,
Returns a stream which applies a transform to the state of this stream.
fn filter<F>(self, f: F) -> Filter<Self, F> where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Returns a stream which filters items of this stream by a predicate.
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F> where
Self: Sized,
F: FnMut(Self::Item) -> Option<B>,
[src]
Self: Sized,
F: FnMut(Self::Item) -> Option<B>,
Returns a stream which filters and transforms items of this stream by a predicate.
fn collect(self) -> Collect<Self> where
Self: Sized,
[src]
Self: Sized,
Returns a stream which collects all items of this stream into a Vec
, returning it along with the stream's state. Read more
fn for_each<F>(self, f: F) -> ForEach<Self, F> where
Self: Sized,
F: FnMut(Self::Item),
[src]
Self: Sized,
F: FnMut(Self::Item),
Returns a future which applies a closure to each item of this stream.