Trait valuable_futures::Future
[−]
[src]
pub trait Future: Sized { type Item; type Error; fn poll(self) -> Result<Async<Self::Item, Self>, Self::Error>; fn into_future(self) -> FutureWrapper<Self> { ... } }
A type-safe future trait
Associated Types
type Item
The type of value that this future will resolved with if it is successful
type Error
The type of error that this future will resolve with if it fails in a normal fashion.
Required Methods
fn poll(self) -> Result<Async<Self::Item, Self>, Self::Error>
Query this future to see if its value has become available, registering interest if it is not.
The only difference of this method to the futures::Future::poll
is that self
is passed by value.
See documentation of futures for more more information on how the method should be implemented.
Provided Methods
fn into_future(self) -> FutureWrapper<Self>
Convert this object into futures::Future