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