Struct futures::future::Fuse [−][src]
#[must_use = "futures do nothing unless polled"]pub struct Fuse<A> where
A: Future, { /* fields omitted */ }
A future which "fuses" a future once it's been resolved.
Normally futures can behave unpredictable once they're used after a future
has been resolved, but Fuse
is always defined to return Async::Pending
from poll
after it has resolved successfully or returned an error.
This is created by the Future::fuse
method.
Trait Implementations
impl<A> Debug for Fuse<A> where
A: Debug + Future,
[src]
impl<A> Debug for Fuse<A> where
A: Debug + Future,
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<A> Future for Fuse<A> where
A: Future,
[src]
impl<A> Future for Fuse<A> where
A: Future,
type Item = <A as Future>::Item
A successful value
type Error = <A as Future>::Error
An error
fn poll(
&mut self,
cx: &mut Context
) -> Result<Async<<A as Future>::Item>, <A as Future>::Error>
[src]
fn poll(
&mut self,
cx: &mut Context
) -> Result<Async<<A as Future>::Item>, <A 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