pub trait Encoding<T> {
// Required methods
fn encode(value: &T) -> Result<Vec<u8>, Error>;
fn decode(raw: &[u8]) -> Result<T, Error>;
}Expand description
How a topic’s messages are encoded. Implemented by the encodings, for the message types each can carry.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".