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;
}
Expand description
encode and decode for frame
Required methods
decode header(if exists) and body
fn encoded_len(&self) -> u32 where
Self: Sized,
fn encoded_len(&self) -> u32 where
Self: Sized,
encoded length