| Crates.io | tokio-bincodec |
| lib.rs | tokio-bincodec |
| version | 0.1.0 |
| created_at | 2022-11-22 06:04:50.462936+00 |
| updated_at | 2022-11-22 06:04:50.462936+00 |
| description | A fork of `tokio-bincode` |
| homepage | |
| repository | https://github.com/fantasyzhjk/tokio-bincodec |
| max_upload_size | |
| id | 720626 |
| size | 8,276 |
A fork of tokio-bincode
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);
This project is licensed under the MIT license.