[][src]Trait overlord::Codec

pub trait Codec: Clone + Debug + Send + PartialEq + Eq {
    fn encode(&self) -> Result<Bytes, Box<dyn Error + Send>>;
fn decode(data: Bytes) -> Result<Self, Box<dyn Error + Send>>; }

Trait for doing serialize and deserialize.

Required methods

fn encode(&self) -> Result<Bytes, Box<dyn Error + Send>>

Serialize self into bytes.

fn decode(data: Bytes) -> Result<Self, Box<dyn Error + Send>>

Deserialize date into self.

Loading content...

Implementors

Loading content...