3 releases (breaking)

0.5.0 Nov 21, 2021
0.4.0 Nov 17, 2021
0.3.0 Nov 17, 2021

#37 in #async-write

MIT license

7KB
82 lines

This crate provides the RwStreamSink type. It wraps around a Stream and Sink that produces and accepts byte arrays, and implements the AsyncRead and AsyncWrite traits.

Each call to AsyncWrite::poll_write will send one packet to the sink. Calls to AsyncRead::poll_read will read from the stream's incoming packets.


lib.rs:

This crate provides the RwStreamSink type. It wraps around a Stream and Sink that produces and accepts byte arrays, and implements AsyncRead and AsyncWrite.

Each call to AsyncWrite::poll_write will send one packet to the sink. Calls to AsyncRead::poll_read will read from the stream's incoming packets.

Dependencies

~2.8–8.5MB
~64K SLoC