tokio-bincodec

Crates.iotokio-bincodec
lib.rstokio-bincodec
version0.1.0
sourcesrc
created_at2022-11-22 06:04:50.462936
updated_at2022-11-22 06:04:50.462936
descriptionA fork of `tokio-bincode`
homepage
repositoryhttps://github.com/fantasyzhjk/tokio-bincodec
max_upload_size
id720626
size8,276
Zh_Jk (fantasyzhjk)

documentation

https://docs.rs/tokio-bincodec

README

tokio-bincodec

Crates.io Crates.io Docs.rs

A fork of tokio-bincode

Usage

First, add this to your Cargo.toml:

[dependencies]
tokio-bincodec = "0.1"

Then you can use it like so:

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

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

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

License

This project is licensed under the MIT license.

Commit count: 11

cargo fmt