Skip to main content

decode_cursor_record

Function decode_cursor_record 

Source
pub fn decode_cursor_record(
    input: &[u8],
) -> Result<Option<(CursorLevel, u64, usize)>, HeaderError>
Expand description

Decodes one record from the front of input.

Ok(None) means the input ends inside a record: read more bytes and retry. That is not a violation — a reader sees whatever slice the transport handed it, and a record is at most MAX_CURSOR_RECORD_LEN bytes, so the retry is bounded. An undefined level in the reserved range is a violation: the value decides what the receiver believes about its own transfer.