[−][src]Trait protocol::wire::middleware::Middleware
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
fn encode_data(&mut self, data: Vec<u8>) -> Result<Vec<u8>, Error>
Processes some data.
fn decode_data(&mut self, data: Vec<u8>) -> Result<Vec<u8>, Error>
Un-processes some data.
Implementors
impl Middleware for Compression
[src]
fn encode_data(&mut self, data: Vec<u8>) -> Result<Vec<u8>, Error>
[src]
fn decode_data(&mut self, data: Vec<u8>) -> Result<Vec<u8>, Error>
[src]
Un-processes some data.