Skip to main content

FrameCodec

Trait FrameCodec 

Source
pub trait FrameCodec {
    type Frame;
    type Error;

    // Required method
    fn try_decode(unread: &[u8]) -> Decoded<Self::Frame, Self::Error>;
}
Expand description

How a stream framing finds the boundary of the next frame.

Required Associated Types§

Required Methods§

Source

fn try_decode(unread: &[u8]) -> Decoded<Self::Frame, Self::Error>

Decodes the first frame of unread.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§