pub trait Middleware: Debug {
    fn encode_data(&mut self, data: Vec<u8>) -> Result<Vec<u8>, Error>;
    fn decode_data(&mut self, data: Vec<u8>) -> Result<Vec<u8>, Error>;
}
Expand description

A hook that sits between reading and writing packets.

Applies one transformation encoding the data, and performs the opposite transformation to decode it.

Required Methods

Processes some data.

Un-processes some data.

Implementors