pub trait Framer {
type Head<'buf>;
// Required methods
fn parse<'buf>(
&mut self,
buf: &'buf [u8],
) -> Option<(Self::Head<'buf>, usize)>;
fn body_len(head: &Self::Head<'_>) -> u32;
}Required Associated Types§
Required Methods§
fn parse<'buf>(&mut self, buf: &'buf [u8]) -> Option<(Self::Head<'buf>, usize)>
fn body_len(head: &Self::Head<'_>) -> u32
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.