Skip to main content

try_decode_session_frame

Function try_decode_session_frame 

Source
pub fn try_decode_session_frame(
    buf: &[u8],
) -> Result<Option<DecodedSessionFrame>, SessionCodecError>
Expand description

Incrementally decode one SESSION-lane SessionFrame from the front of buf.

Returns Ok(None) when buf does not yet hold a complete frame — the caller reads more bytes and retries. On Ok(Some(decoded)) the caller consumes decoded.consumed bytes. This mirrors try_decode_framed and adds the SESSION-lane payload decode on top.

§Errors