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
SessionCodecError::Framingfor a malformed outer frame (bad framing version, oversize, or undecodable envelope).SessionCodecError::WrongProtocolwhen the envelope is well-formed but is not on the SESSION lane — a caller multiplexing lanes must route bypayload_protocolbefore calling this.SessionCodecError::Decodewhen the envelope payload is not a validSessionFrame.