Skip to main content

Codec

Trait Codec 

pub trait Codec:
    Send
    + Sync
    + Debug {
    // Required methods
    fn encode(&self, plain: &[u8]) -> Result<Vec<u8>, String>;
    fn decode(&self, data: &[u8]) -> Result<Vec<u8>, String>;
}
Expand description

Transforms payloads on their way into and out of the journal.

Required Methods§

fn encode(&self, plain: &[u8]) -> Result<Vec<u8>, String>

fn decode(&self, data: &[u8]) -> Result<Vec<u8>, String>

Implementors§