Expand description
Tokio codec for use with bincode
This crate provides a bincode based codec that can be used with
tokio’s Framed, FramedRead, and FramedWrite.
§Example
#[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();Structs§
- BinCodec
- Bincode based codec for use with
tokio-codec