1 2 3 4 5 6 7 8 9
//! Takes a byte buffer and constructs the object use bytes::Buf; pub trait Parseable<E> { type Output; fn parse(buffer: &mut impl Buf) -> Result<Self::Output, E>; }