Struct futures::future::LoopFn
[−]
[src]
#[must_use = "futures do nothing unless polled"]pub struct LoopFn<A, F> where
A: IntoFuture, { /* fields omitted */ }
A future implementing a tail-recursive loop.
Created by the loop_fn
function.
Trait Implementations
impl<A, F> Debug for LoopFn<A, F> where
A: Debug + IntoFuture,
F: Debug,
<A as IntoFuture>::Future: Debug,
[src]
A: Debug + IntoFuture,
F: Debug,
<A as IntoFuture>::Future: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<S, T, A, F> Future for LoopFn<A, F> where
A: IntoFuture<Item = Loop<T, S>>,
F: FnMut(S) -> A,
[src]
A: IntoFuture<Item = Loop<T, S>>,
F: FnMut(S) -> A,
type Item = T
A successful value
type Error = <A as IntoFuture>::Error
An error
fn poll(
&mut self,
cx: &mut Context
) -> Result<Async<<LoopFn<A, F> as Future>::Item>, <LoopFn<A, F> as Future>::Error>
[src]
&mut self,
cx: &mut Context
) -> Result<Async<<LoopFn<A, F> as Future>::Item>, <LoopFn<A, F> as Future>::Error>
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more