tokio-bincode

Crates.iotokio-bincode
lib.rstokio-bincode
version0.1.0
sourcesrc
created_at2019-04-06 16:26:20.863994
updated_at2019-04-06 16:26:20.863994
descriptionBincode based `tokio-codec` adapter.
homepage
repositoryhttps://github.com/LucioFranco/tokio-bincode
max_upload_size
id126186
size10,600
Lucio Franco (LucioFranco)

documentation

https://docs.rs/tokio-bincode

README

tokio-bincode

Build Status

Bincode based tokio-codec adapter.

Usage

First, add this to your Cargo.toml:

[dependencies]
tokio-bincode = "0.1"

Then you can use it like so:

#[derive(Serialize, Deserialize)]
struct MyProtocol;

// Create the codec based on your custom protocol
let codec = BinCodec::<MyProtocol>::new();

// Frame the transport with the codec to produce a stream/sink
let (sink, stream) = Framed::new(transport, codec).split();

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in tokio-bincode by you, shall be licensed as MIT, without any additional terms or conditions.

Commit count: 8

cargo fmt