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