Trait futures_state_stream::StateStream [] [src]

pub trait StateStream {
    type Item;
    type State;
    type Error;
    fn poll(
        &mut self
    ) -> Poll<StreamEvent<Self::Item, Self::State>, (Self::Error, Self::State)>; fn into_future(self) -> IntoFuture<Self>
    where
        Self: Sized
, { ... }
fn into_stream(self) -> IntoStream<Self>
    where
        Self: Sized
, { ... }
fn map<F, B>(self, f: F) -> Map<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> B
, { ... }
fn map_err<F, B>(self, f: F) -> MapErr<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Error) -> B
, { ... }
fn map_state<F, B>(self, f: F) -> MapState<Self, F>
    where
        Self: Sized,
        F: FnOnce(Self::State) -> B
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        Self: Sized,
        F: FnMut(&Self::Item) -> bool
, { ... }
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> Option<B>
, { ... }
fn collect(self) -> Collect<Self>
    where
        Self: Sized
, { ... }
fn for_each<F>(self, f: F) -> ForEach<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Item)
, { ... } }

A variant of futures::Stream which returns a state value when it completes.

Associated Types

The items being streamed.

The state returned when streaming completes.

The error returned.

Required Methods

Similar to Stream::poll.

The end of a stream is indicated by a StreamEvent::Done value. The result of calling poll after the end of the stream or an error has been reached is unspecified.

Provided Methods

Returns a future which yields the next element of the stream.

Returns a normal Stream which yields the elements of this stream and discards the state.

Returns a stream which applies a transform to items of this stream.

Returns a stream which applies a transform to errors of this stream.

Returns a stream which applies a transform to the state of this stream.

Returns a stream which filters items of this stream by a predicate.

Returns a stream which filters and transforms items of this stream by a predicate.

Returns a stream which collects all items of this stream into a Vec, returning it along with the stream's state.

Returns a future which applies a closure to each item of this stream.

Implementations on Foreign Types

impl<S: ?Sized> StateStream for Box<S> where
    S: StateStream
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl<'a, S: ?Sized> StateStream for &'a mut S where
    S: StateStream
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl<S> StateStream for AssertUnwindSafe<S> where
    S: StateStream
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors