[−][src]Trait futures::Stream
A stream of values produced asynchronously.
If Future
is an asynchronous version of Result
, then Stream
is an
asynchronous version of Iterator
. A stream represents a sequence of
value-producing events that occur asynchronously to the caller.
The trait is modeled after Future
, but allows poll_next
to be called
even after a value has been produced, yielding None
once the stream has
been fully exhausted.
Errors
Streams, like futures, also bake in errors through an associated Error
type. An error on a stream does not terminate the stream. That is,
after one error is received, another value may be received from the same
stream (it's valid to keep polling). Thus a stream is somewhat like an
Iterator<Item = Result<T, E>>
, and is always terminated by returning
None
.
Associated Types
Required Methods
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<Self::Item>>, Self::Error>
&mut self,
cx: &mut Context
) -> Result<Async<Option<Self::Item>>, Self::Error>
Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None
if the stream is exhausted.
Return value
There are several possible return values, each indicating a distinct stream state:
-
Ok(Pending)
means that this stream's next value is not ready yet. Implementations will ensure that the current task will be notified when the next value may be ready. -
Ok(Ready(Some(val)))
means that the stream has successfully produced a value,val
, and may produce further values on subsequentpoll_next
calls. -
Ok(Ready(None))
means that the stream has terminated, andpoll_next
should not be invoked again. -
Err(err)
means that the stream encountered an error while trying topoll_next
. Subsequent calls topoll_next
are allowed, and may return further values or errors.
Panics
Once a stream is finished, i.e. Ready(None)
has been returned, further
calls to poll_next
may result in a panic or other "bad behavior". If this
is difficult to guard against then the fuse
adapter can be used to
ensure that poll_next
always returns Ready(None)
in subsequent calls.
Implementations on Foreign Types
impl<S> Stream for Box<S> where
S: Stream + ?Sized,
[src]
impl<S> Stream for Box<S> where
S: Stream + ?Sized,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Box<S> as Stream>::Item>>, <Box<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Box<S> as Stream>::Item>>, <Box<S> as Stream>::Error>
impl<'a, S> Stream for &'a mut S where
S: Stream + ?Sized,
[src]
impl<'a, S> Stream for &'a mut S where
S: Stream + ?Sized,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<&'a mut S as Stream>::Item>>, <&'a mut S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<&'a mut S as Stream>::Item>>, <&'a mut S as Stream>::Error>
impl<S> Stream for AssertUnwindSafe<S> where
S: Stream,
[src]
impl<S> Stream for AssertUnwindSafe<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<T> Stream for VecDeque<T>
[src]
impl<T> Stream for VecDeque<T>
type Item = T
type Error = Never
fn poll_next(
&mut self,
_cx: &mut Context
) -> Result<Async<Option<<VecDeque<T> as Stream>::Item>>, <VecDeque<T> as Stream>::Error>
[src]
fn poll_next(
&mut self,
_cx: &mut Context
) -> Result<Async<Option<<VecDeque<T> as Stream>::Item>>, <VecDeque<T> as Stream>::Error>
impl<A, E, F> Stream for Recover<A, E, F> where
A: Stream,
F: FnMut(<A as Stream>::Error) -> Option<<A as Stream>::Item>,
[src]
impl<A, E, F> Stream for Recover<A, E, F> where
A: Stream,
F: FnMut(<A as Stream>::Error) -> Option<<A as Stream>::Item>,
type Item = <A as Stream>::Item
type Error = E
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<A as Stream>::Item>>, E>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<A as Stream>::Item>>, E>
Implementors
impl Stream for Never
[src]
impl Stream for Never
type Item = Never
type Error = Never
fn poll_next(&mut self, &mut Context) -> Result<Async<Option<Never>>, Never>
[src]
fn poll_next(&mut self, &mut Context) -> Result<Async<Option<Never>>, Never>
impl<A, B> Stream for Either<A, B> where
A: Stream,
B: Stream<Item = <A as Stream>::Item, Error = <A as Stream>::Error>,
[src]
impl<A, B> Stream for Either<A, B> where
A: Stream,
B: Stream<Item = <A as Stream>::Item, Error = <A as Stream>::Error>,
type Item = <A as Stream>::Item
type Error = <A as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<A as Stream>::Item>>, <A as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<A as Stream>::Item>>, <A as Stream>::Error>
impl<F> Stream for FlattenStream<F> where
F: Future,
<F as Future>::Item: Stream,
<<F as Future>::Item as Stream>::Error == <F as Future>::Error,
[src]
impl<F> Stream for FlattenStream<F> where
F: Future,
<F as Future>::Item: Stream,
<<F as Future>::Item as Stream>::Error == <F as Future>::Error,
type Item = <<F as Future>::Item as Stream>::Item
type Error = <<F as Future>::Item as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<FlattenStream<F> as Stream>::Item>>, <FlattenStream<F> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<FlattenStream<F> as Stream>::Item>>, <FlattenStream<F> as Stream>::Error>
impl<F> Stream for IntoStream<F> where
F: Future,
[src]
impl<F> Stream for IntoStream<F> where
F: Future,
type Item = <F as Future>::Item
type Error = <F as Future>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<IntoStream<F> as Stream>::Item>>, <IntoStream<F> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<IntoStream<F> as Stream>::Item>>, <IntoStream<F> as Stream>::Error>
impl<F> Stream for Once<F> where
F: Future,
[src]
impl<F> Stream for Once<F> where
F: Future,
type Item = <F as Future>::Item
type Error = <F as Future>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<F as Future>::Item>>, <F as Future>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<F as Future>::Item>>, <F as Future>::Error>
impl<I, E> Stream for IterOk<I, E> where
I: Iterator,
[src]
impl<I, E> Stream for IterOk<I, E> where
I: Iterator,
type Item = <I as Iterator>::Item
type Error = E
fn poll_next(
&mut self,
&mut Context
) -> Result<Async<Option<<I as Iterator>::Item>>, E>
[src]
fn poll_next(
&mut self,
&mut Context
) -> Result<Async<Option<<I as Iterator>::Item>>, E>
impl<I, T, E> Stream for IterResult<I> where
I: Iterator<Item = Result<T, E>>,
[src]
impl<I, T, E> Stream for IterResult<I> where
I: Iterator<Item = Result<T, E>>,
type Item = T
type Error = E
fn poll_next(&mut self, &mut Context) -> Result<Async<Option<T>>, E>
[src]
fn poll_next(&mut self, &mut Context) -> Result<Async<Option<T>>, E>
impl<S> Stream for Buffer<S> where
S: Sink + Stream,
[src]
impl<S> Stream for Buffer<S> where
S: Sink + Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S> Stream for BufferUnordered<S> where
S: Stream,
<S as Stream>::Item: IntoFuture,
<<S as Stream>::Item as IntoFuture>::Error == <S as Stream>::Error,
[src]
impl<S> Stream for BufferUnordered<S> where
S: Stream,
<S as Stream>::Item: IntoFuture,
<<S as Stream>::Item as IntoFuture>::Error == <S as Stream>::Error,
type Item = <<S as Stream>::Item as IntoFuture>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<BufferUnordered<S> as Stream>::Item>>, <BufferUnordered<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<BufferUnordered<S> as Stream>::Item>>, <BufferUnordered<S> as Stream>::Error>
impl<S> Stream for Buffered<S> where
S: Stream,
<S as Stream>::Item: IntoFuture,
<<S as Stream>::Item as IntoFuture>::Error == <S as Stream>::Error,
[src]
impl<S> Stream for Buffered<S> where
S: Stream,
<S as Stream>::Item: IntoFuture,
<<S as Stream>::Item as IntoFuture>::Error == <S as Stream>::Error,
type Item = <<S as Stream>::Item as IntoFuture>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Buffered<S> as Stream>::Item>>, <Buffered<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Buffered<S> as Stream>::Item>>, <Buffered<S> as Stream>::Error>
impl<S> Stream for CatchUnwind<S> where
S: Stream + UnwindSafe,
[src]
impl<S> Stream for CatchUnwind<S> where
S: Stream + UnwindSafe,
type Item = Result<<S as Stream>::Item, <S as Stream>::Error>
type Error = Box<Any + 'static + Send>
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<CatchUnwind<S> as Stream>::Item>>, <CatchUnwind<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<CatchUnwind<S> as Stream>::Item>>, <CatchUnwind<S> as Stream>::Error>
impl<S> Stream for Chunks<S> where
S: Stream,
[src]
impl<S> Stream for Chunks<S> where
S: Stream,
type Item = Vec<<S as Stream>::Item>
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Chunks<S> as Stream>::Item>>, <Chunks<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Chunks<S> as Stream>::Item>>, <Chunks<S> as Stream>::Error>
impl<S> Stream for Flatten<S> where
S: Stream,
<S as Stream>::Item: Stream,
<<S as Stream>::Item as Stream>::Error: From<<S as Stream>::Error>,
[src]
impl<S> Stream for Flatten<S> where
S: Stream,
<S as Stream>::Item: Stream,
<<S as Stream>::Item as Stream>::Error: From<<S as Stream>::Error>,
type Item = <<S as Stream>::Item as Stream>::Item
type Error = <<S as Stream>::Item as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Flatten<S> as Stream>::Item>>, <Flatten<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Flatten<S> as Stream>::Item>>, <Flatten<S> as Stream>::Error>
impl<S> Stream for Fuse<S> where
S: Stream,
[src]
impl<S> Stream for Fuse<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S> Stream for Peekable<S> where
S: Stream,
[src]
impl<S> Stream for Peekable<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Peekable<S> as Stream>::Item>>, <Peekable<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Peekable<S> as Stream>::Item>>, <Peekable<S> as Stream>::Error>
impl<S> Stream for SelectAll<S> where
S: Stream,
[src]
impl<S> Stream for SelectAll<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<SelectAll<S> as Stream>::Item>>, <SelectAll<S> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<SelectAll<S> as Stream>::Item>>, <SelectAll<S> as Stream>::Error>
impl<S> Stream for Skip<S> where
S: Stream,
[src]
impl<S> Stream for Skip<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S> Stream for SplitStream<S> where
S: Stream,
[src]
impl<S> Stream for SplitStream<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S> Stream for Take<S> where
S: Stream,
[src]
impl<S> Stream for Take<S> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, E> Stream for SinkErrInto<S, E> where
S: Stream + Sink,
[src]
impl<S, E> Stream for SinkErrInto<S, E> where
S: Stream + Sink,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, E> Stream for ErrInto<S, E> where
S: Stream,
<S as Stream>::Error: Into<E>,
[src]
impl<S, E> Stream for ErrInto<S, E> where
S: Stream,
<S as Stream>::Error: Into<E>,
type Item = <S as Stream>::Item
type Error = E
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, E>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, E>
impl<S, F> Stream for SinkMapErr<S, F> where
S: Stream,
[src]
impl<S, F> Stream for SinkMapErr<S, F> where
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, F> Stream for Inspect<S, F> where
F: FnMut(&<S as Stream>::Item),
S: Stream,
[src]
impl<S, F> Stream for Inspect<S, F> where
F: FnMut(&<S as Stream>::Item),
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, F> Stream for InspectErr<S, F> where
F: FnMut(&<S as Stream>::Error),
S: Stream,
[src]
impl<S, F> Stream for InspectErr<S, F> where
F: FnMut(&<S as Stream>::Error),
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, F, U> Stream for Map<S, F> where
F: FnMut(<S as Stream>::Item) -> U,
S: Stream,
[src]
impl<S, F, U> Stream for Map<S, F> where
F: FnMut(<S as Stream>::Item) -> U,
S: Stream,
type Item = U
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<U>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<U>>, <S as Stream>::Error>
impl<S, F, U> Stream for MapErr<S, F> where
F: FnMut(<S as Stream>::Error) -> U,
S: Stream,
[src]
impl<S, F, U> Stream for MapErr<S, F> where
F: FnMut(<S as Stream>::Error) -> U,
S: Stream,
type Item = <S as Stream>::Item
type Error = U
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, U>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, U>
impl<S, R, F, B> Stream for FilterMap<S, R, F> where
F: FnMut(<S as Stream>::Item) -> R,
R: IntoFuture<Item = Option<B>, Error = <S as Stream>::Error>,
S: Stream,
[src]
impl<S, R, F, B> Stream for FilterMap<S, R, F> where
F: FnMut(<S as Stream>::Item) -> R,
R: IntoFuture<Item = Option<B>, Error = <S as Stream>::Error>,
S: Stream,
type Item = B
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<B>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<B>>, <S as Stream>::Error>
impl<S, R, P> Stream for Filter<S, R, P> where
P: FnMut(&<S as Stream>::Item) -> R,
R: IntoFuture<Item = bool, Error = <S as Stream>::Error>,
S: Stream,
[src]
impl<S, R, P> Stream for Filter<S, R, P> where
P: FnMut(&<S as Stream>::Item) -> R,
R: IntoFuture<Item = bool, Error = <S as Stream>::Error>,
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, R, P> Stream for SkipWhile<S, R, P> where
P: FnMut(&<S as Stream>::Item) -> R,
R: IntoFuture<Item = bool, Error = <S as Stream>::Error>,
S: Stream,
[src]
impl<S, R, P> Stream for SkipWhile<S, R, P> where
P: FnMut(&<S as Stream>::Item) -> R,
R: IntoFuture<Item = bool, Error = <S as Stream>::Error>,
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, R, P> Stream for TakeWhile<S, R, P> where
P: FnMut(&<S as Stream>::Item) -> R,
R: IntoFuture<Item = bool, Error = <S as Stream>::Error>,
S: Stream,
[src]
impl<S, R, P> Stream for TakeWhile<S, R, P> where
P: FnMut(&<S as Stream>::Item) -> R,
R: IntoFuture<Item = bool, Error = <S as Stream>::Error>,
S: Stream,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, U, F> Stream for AndThen<S, U, F> where
F: FnMut(<S as Stream>::Item) -> U,
S: Stream,
U: IntoFuture<Error = <S as Stream>::Error>,
[src]
impl<S, U, F> Stream for AndThen<S, U, F> where
F: FnMut(<S as Stream>::Item) -> U,
S: Stream,
U: IntoFuture<Error = <S as Stream>::Error>,
type Item = <U as IntoFuture>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<U as IntoFuture>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<U as IntoFuture>::Item>>, <S as Stream>::Error>
impl<S, U, F> Stream for OrElse<S, U, F> where
F: FnMut(<S as Stream>::Error) -> U,
S: Stream,
U: IntoFuture<Item = <S as Stream>::Item>,
[src]
impl<S, U, F> Stream for OrElse<S, U, F> where
F: FnMut(<S as Stream>::Error) -> U,
S: Stream,
U: IntoFuture<Item = <S as Stream>::Item>,
type Item = <S as Stream>::Item
type Error = <U as IntoFuture>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <U as IntoFuture>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <U as IntoFuture>::Error>
impl<S, U, F> Stream for Then<S, U, F> where
F: FnMut(Result<<S as Stream>::Item, <S as Stream>::Error>) -> U,
S: Stream,
U: IntoFuture,
[src]
impl<S, U, F> Stream for Then<S, U, F> where
F: FnMut(Result<<S as Stream>::Item, <S as Stream>::Error>) -> U,
S: Stream,
U: IntoFuture,
type Item = <U as IntoFuture>::Item
type Error = <U as IntoFuture>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<U as IntoFuture>::Item>>, <U as IntoFuture>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<U as IntoFuture>::Item>>, <U as IntoFuture>::Error>
impl<S, U, Fut, F> Stream for With<S, U, Fut, F> where
F: FnMut(U) -> Fut,
Fut: IntoFuture,
S: Stream + Sink,
[src]
impl<S, U, Fut, F> Stream for With<S, U, Fut, F> where
F: FnMut(U) -> Fut,
Fut: IntoFuture,
S: Stream + Sink,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S, U, St, F> Stream for WithFlatMap<S, U, St, F> where
F: FnMut(U) -> St,
S: Stream + Sink,
St: Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>,
[src]
impl<S, U, St, F> Stream for WithFlatMap<S, U, St, F> where
F: FnMut(U) -> St,
S: Stream + Sink,
St: Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>,
type Item = <S as Stream>::Item
type Error = <S as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
impl<S1, S2> Stream for Chain<S1, S2> where
S1: Stream,
S2: Stream<Item = <S1 as Stream>::Item, Error = <S1 as Stream>::Error>,
[src]
impl<S1, S2> Stream for Chain<S1, S2> where
S1: Stream,
S2: Stream<Item = <S1 as Stream>::Item, Error = <S1 as Stream>::Error>,
type Item = <S1 as Stream>::Item
type Error = <S1 as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Chain<S1, S2> as Stream>::Item>>, <Chain<S1, S2> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Chain<S1, S2> as Stream>::Item>>, <Chain<S1, S2> as Stream>::Error>
impl<S1, S2> Stream for Select<S1, S2> where
S1: Stream,
S2: Stream<Item = <S1 as Stream>::Item, Error = <S1 as Stream>::Error>,
[src]
impl<S1, S2> Stream for Select<S1, S2> where
S1: Stream,
S2: Stream<Item = <S1 as Stream>::Item, Error = <S1 as Stream>::Error>,
type Item = <S1 as Stream>::Item
type Error = <S1 as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S1 as Stream>::Item>>, <S1 as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S1 as Stream>::Item>>, <S1 as Stream>::Error>
impl<S1, S2> Stream for Zip<S1, S2> where
S1: Stream,
S2: Stream<Error = <S1 as Stream>::Error>,
[src]
impl<S1, S2> Stream for Zip<S1, S2> where
S1: Stream,
S2: Stream<Error = <S1 as Stream>::Error>,
type Item = (<S1 as Stream>::Item, <S2 as Stream>::Item)
type Error = <S1 as Stream>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Zip<S1, S2> as Stream>::Item>>, <Zip<S1, S2> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Zip<S1, S2> as Stream>::Item>>, <Zip<S1, S2> as Stream>::Error>
impl<T> Stream for Receiver<T>
[src]
impl<T> Stream for Receiver<T>
type Item = T
type Error = Never
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Receiver<T> as Stream>::Item>>, <Receiver<T> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<Receiver<T> as Stream>::Item>>, <Receiver<T> as Stream>::Error>
impl<T> Stream for UnboundedReceiver<T>
[src]
impl<T> Stream for UnboundedReceiver<T>
type Item = T
type Error = Never
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<UnboundedReceiver<T> as Stream>::Item>>, <UnboundedReceiver<T> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<UnboundedReceiver<T> as Stream>::Item>>, <UnboundedReceiver<T> as Stream>::Error>
impl<T> Stream for FuturesOrdered<T> where
T: Future,
[src]
impl<T> Stream for FuturesOrdered<T> where
T: Future,
type Item = <T as Future>::Item
type Error = <T as Future>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<FuturesOrdered<T> as Stream>::Item>>, <FuturesOrdered<T> as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<FuturesOrdered<T> as Stream>::Item>>, <FuturesOrdered<T> as Stream>::Error>
impl<T> Stream for FuturesUnordered<T> where
T: Future,
[src]
impl<T> Stream for FuturesUnordered<T> where
T: Future,
type Item = <T as Future>::Item
type Error = <T as Future>::Error
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<T as Future>::Item>>, <T as Future>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<T as Future>::Item>>, <T as Future>::Error>
impl<T, E> Stream for Empty<T, E>
[src]
impl<T, E> Stream for Empty<T, E>
type Item = T
type Error = E
fn poll_next(
&mut self,
&mut Context
) -> Result<Async<Option<<Empty<T, E> as Stream>::Item>>, <Empty<T, E> as Stream>::Error>
[src]
fn poll_next(
&mut self,
&mut Context
) -> Result<Async<Option<<Empty<T, E> as Stream>::Item>>, <Empty<T, E> as Stream>::Error>
impl<T, E> Stream for Repeat<T, E> where
T: Clone,
[src]
impl<T, E> Stream for Repeat<T, E> where
T: Clone,
type Item = T
type Error = E
fn poll_next(
&mut self,
&mut Context
) -> Result<Async<Option<<Repeat<T, E> as Stream>::Item>>, <Repeat<T, E> as Stream>::Error>
[src]
fn poll_next(
&mut self,
&mut Context
) -> Result<Async<Option<<Repeat<T, E> as Stream>::Item>>, <Repeat<T, E> as Stream>::Error>
impl<T, E, F> Stream for PollFn<F> where
F: FnMut(&mut Context) -> Result<Async<Option<T>>, E>,
[src]
impl<T, E, F> Stream for PollFn<F> where
F: FnMut(&mut Context) -> Result<Async<Option<T>>, E>,
type Item = T
type Error = E
fn poll_next(&mut self, cx: &mut Context) -> Result<Async<Option<T>>, E>
[src]
fn poll_next(&mut self, cx: &mut Context) -> Result<Async<Option<T>>, E>
impl<T, F, Fut, It> Stream for Unfold<T, F, Fut> where
F: FnMut(T) -> Fut,
Fut: IntoFuture<Item = Option<(It, T)>>,
[src]
impl<T, F, Fut, It> Stream for Unfold<T, F, Fut> where
F: FnMut(T) -> Fut,
Fut: IntoFuture<Item = Option<(It, T)>>,