[][src]Crate tokio_bincode

Tokio codec for use with bincode

This crate provides a bincode based codec that can be used with tokio's Framed, FramedRead, and FramedWrite.


#[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();



Bincode based codec for use with tokio-codec