Skip to main content

read_map_len

Function read_map_len 

Source
pub fn read_map_len<T: DeserializableTraceData>(
    buf: &mut Buffer<T>,
) -> Result<usize, DecodeError>
Expand description

Reads map length from the buffer

§Arguments

  • buf - A reference to the Bytes containing the encoded map data.

§Returns

  • Ok(usize) - Map length.
  • Err(DecodeError) - An error if the decoding process fails.

§Errors

This function will return an error if:

  • The buffer does not contain a map.
  • There is an error reading from the buffer.