Struct futures::stream::Unfold [−][src]
#[must_use = "streams do nothing unless polled"]pub struct Unfold<T, F, Fut> { /* fields omitted */ }
A stream which creates futures, polls them and return their result
This stream is returned by the futures::stream::unfold
method
Trait Implementations
impl<T, F, Fut> Unpin for Unfold<T, F, Fut> where
Fut: Unpin,
[src]
impl<T, F, Fut> Unpin for Unfold<T, F, Fut> where
Fut: Unpin,
impl<T, F, Fut> Debug for Unfold<T, F, Fut> where
F: Debug,
Fut: Debug,
T: Debug,
[src]
impl<T, F, Fut> Debug for Unfold<T, F, Fut> where
F: Debug,
Fut: Debug,
T: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T, F, Fut, It> Stream for Unfold<T, F, Fut> where
F: FnMut(T) -> Fut,
Fut: Future<Output = Option<(It, T)>>,
[src]
impl<T, F, Fut, It> Stream for Unfold<T, F, Fut> where
F: FnMut(T) -> Fut,
Fut: Future<Output = Option<(It, T)>>,
type Item = It
Values yielded by the stream.
fn poll_next(
self: PinMut<Unfold<T, F, Fut>>,
cx: &mut Context
) -> Poll<Option<It>>
[src]
fn poll_next(
self: PinMut<Unfold<T, F, Fut>>,
cx: &mut Context
) -> Poll<Option<It>>
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. Read more