Skip to main content

from_bytes

Function from_bytes 

Source
pub fn from_bytes(
    data: Bytes,
) -> Result<(TracerPayloadBytes, usize), DecodeError>
Expand description

Decodes a V1 msgpack payload from owned bytes into a TracerPayloadBytes.

§Returns

  • Ok((payload, payload_size)) — the decoded payload and the number of bytes consumed from the buffer.
  • Err(DecodeError) — if the payload is malformed.

§Errors

Returns an error for any malformed map / array length, unknown map key, missing required field, or any embedded msgpack read failure.