Merge pull request #66 from tomaka/rw-sink-stream-docs

Add doc and README for rw-stream-sink
This commit is contained in:
tomaka 2017-12-07 13:25:22 +01:00 committed by GitHub
commit 0146864d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

8
rw-stream-sink/README.md Normal file
View 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.

View File

@ -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;