[][src]Trait adventure::Response

pub trait Response {
    type Ok;
    type Error;
    fn poll(
        self: Pin<&mut Self>,
        w: &Waker
    ) -> Poll<Result<Self::Ok, Self::Error>>; fn into_future(self) -> IntoFuture<Self>
    where
        Self: Sized
, { ... } }

Trait to represent types of the response, and the task to receive it.

Associated Types

type Ok

The type of successful values of this response.

type Error

The type of failures of this response.

Loading content...

Required methods

fn poll(self: Pin<&mut Self>, w: &Waker) -> Poll<Result<Self::Ok, Self::Error>>

Poll this Response.

Loading content...

Provided methods

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized

Wrap this response into a type that can work with futures.

It is compatible with both types of futures 0.1 Future and std::future::Future.

Loading content...

Implementations on Foreign Types

impl<P> Response for Pin<P> where
    P: DerefMut + Unpin,
    <P as Deref>::Target: Response
[src]

type Ok = <<P as Deref>::Target as Response>::Ok

type Error = <<P as Deref>::Target as Response>::Error

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<'a, R: ?Sized> Response for &'a mut R where
    R: Response + Unpin
[src]

type Ok = R::Ok

type Error = R::Error

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<R: ?Sized> Response for Box<R> where
    R: Response + Unpin
[src]

type Ok = R::Ok

type Error = R::Error

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

Loading content...

Implementors

impl Response for Delay[src]

type Ok = ()

type Error = RetryError

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<'a, T, E> Response for Future01ResponseObj<'a, T, E>[src]

type Ok = T

type Error = E

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<'a, T, E> Response for FutureResponseObj<'a, T, E>[src]

type Ok = T

type Error = E

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<'a, T, E> Response for LocalFuture01ResponseObj<'a, T, E>[src]

type Ok = T

type Error = E

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<'a, T, E> Response for LocalFutureResponseObj<'a, T, E>[src]

type Ok = T

type Error = E

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<F> Response for Future01Response<F> where
    F: Future
[src]

type Ok = F::Item

type Error = F::Error

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<F> Response for FutureResponse<F> where
    F: TryFuture
[src]

type Ok = F::Ok

type Error = F::Error

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

impl<R, C> Response for Retrial<R, C> where
    R: RetryMethod<C> + Unpin,
    R::Response: Unpin,
    C: Clone
[src]

type Ok = <R::Response as Response>::Ok

type Error = RetryError<<<R as RetryMethod<C>>::Response as Response>::Error>

Important traits for IntoFuture<T>
fn into_future(self) -> IntoFuture<Self> where
    Self: Sized
[src]

Loading content...