pub trait EventCodec: Send + Sync {
// Required methods
fn decode(&self, bytes: &[u8]) -> Result<Value, Error>;
fn encode(&self, event: &Value, out: &mut Vec<u8>) -> Result<(), Error>;
}Expand description
Events as bytes: a record’s bytes to the JSON event a machine handles, and an event to bytes.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".