smol-rs / futures-lite

Futures, streams, and async I/O combinators.
Apache License 2.0
439 stars 25 forks source link

BoxedAsyncRead and BoxedAsyncWrite #17

Closed ghost closed 3 years ago

ghost commented 4 years ago

I'm considering adding the following type aliases:

type BoxedAsyncRead = Pin<Box<dyn AsyncRead + Send + 'static>>;
type BoxedAsyncWrite = Pin<Box<dyn AsyncWrite + Send + 'static>>;

Then, AsyncReadExt and AsyncWriteExt could also have methods boxed_read() and boxed_write().

Would anyone else find this useful?

ghost commented 3 years ago

I have added BoxedReader and BoxedWriter to the io module.