# Trait futures_core::future::TryFuture [−] [src]

    pub trait TryFuture: Future + Sealed {
        type Ok;
        type Error;
        fn try_poll(
            self: Pin<&mut Self>,
            cx: &mut Context<'_>
        ) -> Poll<Result<Self::Ok, Self::Error>>;
    }

A convenience for futures that return `Result` values that includes a variety of adapters tailored to such futures.

## Associated Types

### `type Ok` [src]

The type of successful values yielded by this future

### `type Error` [src]

The type of failures yielded by this future

Loading content...

## Required methods

### `fn try_poll(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Self::Ok, Self::Error>>` [src]

Poll this `TryFuture` as if it were a `Future`.

This method is a stopgap for a compiler limitation that prevents us from directly inheriting from the `Future` trait; in the future it won’t be needed.

Loading content...

## Implementors

### `impl<F: ?Sized, T, E> TryFuture for F where
F: Future<Output = Result<T, E>>,` [src]

#### `type Ok = T`

#### `type Error = E`

#### `fn try_poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>` [src]

Loading content...