pub trait Codec: DynClone {
// Required methods
fn encode<'a>(&mut self, frame: Frame<'a>) -> Result<Frame<'a>>;
fn decode<'a>(&mut self, frame: Frame<'a>) -> Result<Frame<'a>>;
}
Expand description
Represents abstraction that implements specific encoder and decoder logic to transform an arbitrary collection of bytes. This can be used to encrypt and authenticate bytes sent and received by transports.