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.
Required Methods§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".