Decoder

Trait Decoder 

Source
pub trait Decoder<T: CodecConfiguration>:
    Codec<T>
    + Send
    + Sync {
    // Required methods
    fn send_packet(&mut self, config: &T, packet: &Packet<'_>) -> Result<()>;
    fn receive_frame_borrowed(&mut self, config: &T) -> Result<Frame<'_>>;
    fn flush(&mut self, config: &T) -> Result<()>;

    // Provided method
    fn receive_frame(&mut self, config: &T) -> Result<Frame<'static>> { ... }
}

Required Methods§

Source

fn send_packet(&mut self, config: &T, packet: &Packet<'_>) -> Result<()>

Source

fn receive_frame_borrowed(&mut self, config: &T) -> Result<Frame<'_>>

Source

fn flush(&mut self, config: &T) -> Result<()>

Provided Methods§

Source

fn receive_frame(&mut self, config: &T) -> Result<Frame<'static>>

Implementors§