Module toy_rpc::codec[][src]

Expand description

SplittibleServerCodec and SplittableClientCodec are defined in this module, and they are implemented for the DefaultCodec Default codec implementations are feature gated behind the following features serde_bincode, serde_json, serde_cbor, serde_rmp.

Re-exports

pub use Codec as DefaultCodec;

Modules

bincodeserde_bincode and non-serde_json and non-serde_cbor and non-serde_rmp

Impplementation of CodecRead, CodecWrite, Marshal, Unmarshal and EraseDeserializer traits with bincode

cborserde_cbor and non-serde_json and non-serde_bincode and non-serde_rmp

Impplementation of CodecRead, CodecWrite, Marshal, Unmarshal and EraseDeserializer traits with serde_cbor

jsonserde_json and non-serde_bincode and non-serde_cbor and non-serde_rmp

Impplementation of CodecRead, CodecWrite, Marshal, Unmarshal and EraseDeserializer traits with serde_json

rmpserde_rmp and non-serde_cbor and non-serde_json and non-serde_bincode

Impplementation of CodecRead, CodecWrite, Marshal, Unmarshal and EraseDeserializer traits with rmp-serde

split

Implements SplittableServerCodec and SplittableClientCodec

Structs

Codec

Default codec. Codec is re-exported as DefaultCodec when one of these feature flags is toggled (serde_bincode, serde_json, serde_cbor, serde_rmp“)

Traits

CodecRead

A codec that can read the header and body of a message

CodecWrite

A codec that can write the header and body of a message

EraseDeserializer

This trait should be implemented by a codec to allow creating a erased_serde::Deserilizer from bytes

Marshal

This trait should be implemented by serializer (Codec) to serialize messages into bytes

Unmarshal

This trait should be implemented by deserializer (Codec) to deserialize messages from bytes