[−][src]Trait futures_util::compat::Stream01CompatExt
Extension trait for futures 0.1 Stream
Provided methods
ⓘImportant traits for Compat01As03<Fut>fn compat(self) -> Compat01As03<Self> where
Self: Sized,
ⓘImportant traits for Compat01As03<Fut>
Self: Sized,
Converts a futures 0.1
Stream<Item = T, Error = E>
into a futures 0.3
Stream<Item = Result<T, E>>
.
#![feature(async_await, await_macro, futures_api)] use futures::stream::StreamExt; use futures_util::compat::Stream01CompatExt; let stream = futures_01::stream::once::<u32, ()>(Ok(1)); let mut stream = stream.compat(); assert_eq!(await!(stream.next()), Some(Ok(1))); assert_eq!(await!(stream.next()), None);
Implementors
impl<St: Stream01> Stream01CompatExt for St
[src]
ⓘImportant traits for Compat01As03<Fut>fn compat(self) -> Compat01As03<Self> where
Self: Sized,
[src]
ⓘImportant traits for Compat01As03<Fut>
Self: Sized,