Trait Decoder
Source pub trait Decoder<T>:
Codec<T>
+ Send
+ Sync{
// Required methods
fn send_packet(
&mut self,
config: &T,
pool: Option<&Arc<FramePool<Frame<'static, <T as CodecSpec>::FrameDescriptor>>>>,
packet: &Packet<'_>,
) -> Result<(), Error>;
fn receive_frame(
&mut self,
config: &T,
pool: Option<&Arc<FramePool<Frame<'static, <T as CodecSpec>::FrameDescriptor>>>>,
) -> Result<SharedFrame<Frame<'static, <T as CodecSpec>::FrameDescriptor>>, Error>;
fn flush(&mut self, config: &T) -> Result<(), Error>;
// Provided method
fn init(&mut self, _config: &T) -> Result<(), Error> { ... }
}