Skip to main content

Framer

Trait Framer 

Source
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§

Source

type Head<'buf>

Required Methods§

Source

fn parse<'buf>(&mut self, buf: &'buf [u8]) -> Option<(Self::Head<'buf>, usize)>

Source

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.

Implementors§