[−][src]Trait futures::compat::AsyncWrite01CompatExt
Extension trait for tokio-io AsyncWrite
Provided methods
ⓘImportant traits for Compat01As03<Fut>default fn compat(self) -> Compat01As03<Self>
ⓘImportant traits for Compat01As03<Fut>
Converts a tokio-io AsyncWrite
into a futures-io 0.3
AsyncWrite
.
#![feature(async_await, await_macro, futures_api, impl_trait_in_bindings)] use futures::io::AsyncWriteExt; use futures_util::compat::AsyncWrite01CompatExt; let input = b"Hello World!"; let mut cursor = std::io::Cursor::new(Vec::with_capacity(12)); let mut writer = (&mut cursor).compat(); await!(writer.write_all(input)).unwrap(); assert_eq!(cursor.into_inner(), input);
Implementors
impl<W> AsyncWrite01CompatExt for W where
W: AsyncWrite,
[src]
W: AsyncWrite,
ⓘImportant traits for Compat01As03<Fut>default fn compat(self) -> Compat01As03<Self>
[src]
ⓘImportant traits for Compat01As03<Fut>