[−][src]Trait futures::compat::Future01CompatExt
Extension trait for futures 0.1 Future
Provided methods
ⓘImportant traits for Compat01As03<Fut>default fn compat(self) -> Compat01As03<Self>
ⓘImportant traits for Compat01As03<Fut>
Converts a futures 0.1
Future<Item = T, Error = E>
into a futures 0.3
Future<Output = Result<T, E>>
.
#![feature(async_await, await_macro, futures_api)] use futures_util::compat::Future01CompatExt; let future = futures_01::future::ok::<u32, ()>(1); assert_eq!(await!(future.compat()), Ok(1));
Implementors
impl<Fut> Future01CompatExt for Fut where
Fut: Future,
[src]
Fut: Future,
ⓘImportant traits for Compat01As03<Fut>default fn compat(self) -> Compat01As03<Self>
[src]
ⓘImportant traits for Compat01As03<Fut>