pub trait Codec<A> {
// Required methods
fn encode(&self, item: A) -> Option<Vec<u8>>;
fn decode(&self, bytes: &mut [u8]) -> Option<A>;
}
Expand description
A trait for codecs for a specic type A
, usually an event type stored on a CommitLog.