To define a custom future, you'll typically use these 4 imports: use futures::prelude::*; use std::pin::Pin; use task::{Waker, Poll}; I think there's a case to be made to expand Rust's std prelude once Futures are stabilized.
I can't make any predictions to how often people will define custom Futures. But I *can* tell you it'll make life a whole lot easier for when you have to define a lot of them (like I'm currently doing).
-
-
Oh yeah, I hear you. Although `impl Future` helps me a lot nowadays.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.