Trait async_prost::Framed[][src]

pub trait Framed: Debug + Send + Sync {
    fn decode(buf: &[u8], header_len: usize) -> Result<Self, Error>
    where
        Self: Default
;
fn encoded_len(&self) -> u32
    where
        Self: Sized
;
fn encode<B>(&self, buf: &mut B) -> Result<(), Error>
    where
        B: BufMut,
        Self: Sized
; }

encode and decode for frame

Required methods

fn decode(buf: &[u8], header_len: usize) -> Result<Self, Error> where
    Self: Default
[src]

decode header(if exists) and body

fn encoded_len(&self) -> u32 where
    Self: Sized
[src]

encoded length

fn encode<B>(&self, buf: &mut B) -> Result<(), Error> where
    B: BufMut,
    Self: Sized
[src]

encode header and body, with length

Loading content...

Implementors

impl<H, T> Framed for Frame<H, T> where
    H: Message + ShallDecodeBody + Default,
    T: Message + Default
[src]

Loading content...