Trait IntoStaticFuture

Source
pub trait IntoStaticFuture {
    type Future: Future<Item = Self::Item, Error = Self::Error> + 'static + Send;
    type Item;
    type Error;

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

Class of types which can be converted into a future. This trait is only differs from futures::future::IntoFuture in that the returned future has the 'static lifetime.

Required Associated Types§

Source

type Future: Future<Item = Self::Item, Error = Self::Error> + 'static + Send

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_static_future(self) -> Self::Future

Consumes this object and produces a future.

Implementors§

Source§

impl<F: IntoFuture> IntoStaticFuture for F
where <F as IntoFuture>::Future: 'static + Send,