Trait IntoFuture

Source
pub trait IntoFuture {
    type Future: Future<Item = Self::Item, Error = Self::Error>;
    type Item;
    type Error;

    // Required method
    fn into_future(self) -> Self::Future;
}
Expand description

Class of types which can be converted into a future.

This trait is very similar to the IntoIterator trait and is intended to be used in a very similar fashion.

Required Associated Types§

Source

type Future: Future<Item = Self::Item, Error = Self::Error>

The future that this type can be converted into.

Source

type Item

The item that the future may resolve with.

Source

type Error

The error that the future may resolve with.

Required Methods§

Source

fn into_future(self) -> Self::Future

Consumes this object and produces a future.

Implementations on Foreign Types§

Source§

impl IntoFuture for Spawn

Source§

impl<A, B> IntoFuture for (A, B)
where A: IntoFuture, B: IntoFuture<Error = <A as IntoFuture>::Error>,

Source§

impl<A, B, C> IntoFuture for (A, B, C)
where A: IntoFuture, B: IntoFuture<Error = <A as IntoFuture>::Error>, C: IntoFuture<Error = <A as IntoFuture>::Error>,

Source§

impl<A, B, C, D> IntoFuture for (A, B, C, D)
where A: IntoFuture, B: IntoFuture<Error = <A as IntoFuture>::Error>, C: IntoFuture<Error = <A as IntoFuture>::Error>, D: IntoFuture<Error = <A as IntoFuture>::Error>,

Source§

impl<A, B, C, D, E> IntoFuture for (A, B, C, D, E)
where A: IntoFuture, B: IntoFuture<Error = <A as IntoFuture>::Error>, C: IntoFuture<Error = <A as IntoFuture>::Error>, D: IntoFuture<Error = <A as IntoFuture>::Error>, E: IntoFuture<Error = <A as IntoFuture>::Error>,

Source§

impl<T, E> IntoFuture for Result<T, E>

Implementors§

Source§

impl<F> IntoFuture for F
where F: Future,

Source§

type Future = F

Source§

type Item = <F as Future>::Item

Source§

type Error = <F as Future>::Error