Struct conch_runtime::future::Fuse [−][src]
#[must_use = "futures do nothing unless polled"]pub struct Fuse<F> { /* 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 or cancelled, but Fuse
is always defined to return
Async::NotReady
from poll
after the future has succeeded, failed,
or has been cancelled.
Similarly, calls to cancel
will also be ignored after the future has
succeeded, failed, or has been cancelled.
Created by the EnvFuture::fuse
method.
Trait Implementations
impl<F: Debug> Debug for Fuse<F>
[src]
impl<F: Debug> Debug for Fuse<F>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E: ?Sized, F: EnvFuture<E>> EnvFuture<E> for Fuse<F>
[src]
impl<E: ?Sized, F: EnvFuture<E>> EnvFuture<E> for Fuse<F>
type Item = F::Item
The type of value that this future will resolved with if it is successful. Read more
type Error = F::Error
The type of error that this future will resolve with if it fails in a normal fashion. Read more
fn poll(&mut self, env: &mut E) -> Poll<Self::Item, Self::Error>
[src]
fn poll(&mut self, env: &mut E) -> Poll<Self::Item, Self::Error>
Behaves identical to Future::poll
when polled with a provided environment. Read more
fn cancel(&mut self, env: &mut E)
[src]
fn cancel(&mut self, env: &mut E)
Cancel a future and consider it as completed, thus giving it a chance to run any clean up as if it had resolved on its own. Read more
fn pin_env(self, env: E) -> Pinned<E, Self> where
E: Sized,
Self: Sized,
[src]
fn pin_env(self, env: E) -> Pinned<E, Self> where
E: Sized,
Self: Sized,
Pin an environment to this future, allowing the resulting future to be polled from anywhere without needing the caller to specify an environment. Read more
fn fuse(self) -> Fuse<Self> where
Self: Sized,
[src]
fn fuse(self) -> Fuse<Self> where
Self: Sized,
Fuse a future such that poll
and cancel
will never again be called once it has completed. Read more
fn boxed_result<'a>(self) -> BoxedResult<'a, Self> where
Self: Sized,
Self::Item: 'a + Future,
[src]
fn boxed_result<'a>(self) -> BoxedResult<'a, Self> where
Self: Sized,
Self::Item: 'a + Future,
Converts the resulting future into a boxed trait object. Read more