pub trait SerdeCodec {
// Required methods
fn write<T, W>(item: T, w: W) -> Result<(), Status>
where T: Serialize,
W: Write;
fn read<T, R>(r: R) -> Result<T, Status>
where T: for<'de> Deserialize<'de>,
R: Read;
}Required Methods§
fn write<T, W>(item: T, w: W) -> Result<(), Status>
fn read<T, R>(r: R) -> Result<T, Status>where
T: for<'de> Deserialize<'de>,
R: Read,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl SerdeCodec for BincodeSerdeCodec
Available on crate feature
bincode only.impl SerdeCodec for CborSerdeCodec
Available on crate feature
cbor only.impl SerdeCodec for JsonSerdeCodec
Available on crate feature
json only.impl SerdeCodec for MessagePackSerdeCodec
Available on crate feature
messagepack only.