pub fn decode<'a>(
buf: &'a [u8],
limits: &Limits,
) -> Result<Option<(Frame<'a>, usize)>, ProtocolError>Expand description
Reads one frame from the front of buf.
Returns the frame and how many bytes it used, or None if the frame has not
fully arrived. Pipelined replies are read by calling this again on what is
left.
ยงErrors
Any ProtocolError. As on the request side, there is no recovering from
one: the two ends disagree about where the next frame starts.