Trait puffin::protocol::ProtocolMessageDeframer
source · pub trait ProtocolMessageDeframer<PT: ProtocolTypes> {
type OpaqueProtocolMessage: OpaqueProtocolMessage<PT>;
// Required methods
fn pop_frame(&mut self) -> Option<Self::OpaqueProtocolMessage>;
fn read(&mut self, rd: &mut dyn Read) -> Result<usize>;
}
Expand description
Deframes a stream of bytes into distinct OpaqueProtocolMessages. A deframer is usually state-ful. This means it produces as many messages from the input bytes and stores them.