Skip to main content

peek_tag

Function peek_tag 

Source
pub fn peek_tag(payload: &[u8]) -> Option<CodecTag>
Expand description

Peek at the first byte of a tile payload and return the codec tag.

Returns Some(tag) for a recognized new-format tag byte. Returns None for an empty payload or any unrecognized byte (including former msgpack map-start bytes 0x80–0x8f, 0xde, 0xdf) — callers must surface a SegmentCorruption error.