mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-01 12:11:20 +00:00
Merge pull request #66 from tomaka/rw-sink-stream-docs
Add doc and README for rw-stream-sink
This commit is contained in:
commit
0146864d94
8
rw-stream-sink/README.md
Normal file
8
rw-stream-sink/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
This crate provides the `RwStreamSink` type. It wraps around a `Stream + Sink` that produces
|
||||
and accepts byte arrays, and implements `AsyncRead` and `AsyncWrite`.
|
||||
|
||||
Each call to `write()` will send one packet on the sink. Calls to `read()` will read from
|
||||
incoming packets.
|
||||
|
||||
> **Note**: Although this crate is hosted in the libp2p repo, it is purely a utility crate and
|
||||
> not at all specific to libp2p.
|
@ -18,8 +18,17 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// TODO: use this once stable ; for now we just copy-paste the content of the README.md
|
||||
//#![doc(include = "../README.md")]
|
||||
|
||||
//! This crate provides the `RwStreamSink` type. It wraps around a `Stream + Sink` that produces
|
||||
//! byte arrays, and implements `AsyncRead` and `AsyncWrite`.
|
||||
//! and accepts byte arrays, and implements `AsyncRead` and `AsyncWrite`.
|
||||
//!
|
||||
//! Each call to `write()` will send one packet on the sink. Calls to `read()` will read from
|
||||
//! incoming packets.
|
||||
//!
|
||||
//! > **Note**: Although this crate is hosted in the libp2p repo, it is purely a utility crate and
|
||||
//! > not at all specific to libp2p.
|
||||
|
||||
extern crate bytes;
|
||||
extern crate futures;
|
||||
|
Loading…
x
Reference in New Issue
Block a user