Expand description
Streaming TLV decoder.
TlvReader::next walks the input one element at a time. Scalars are
returned as Element::Scalar; containers emit a Element::ContainerStart
immediately followed by the children’s elements and then a matching
Element::ContainerEnd. Use TlvReader::read_value to materialise an
entire element tree in one call.
Structs§
- TlvReader
- A streaming TLV decoder over a borrowed byte slice.
Enums§
- Container
Kind - Which kind of TLV container a
ContainerStartannounces. - Element
- One step of the streaming reader.
Constants§
- DEFAULT_
ELEMENT_ BUDGET - Default ceiling on the total number of
Valueelements a singleTlvReader::read_valuecall may materialise. - MAX_
DEPTH - Maximum container nesting depth the reader accepts. The Matter spec recommends a 32-level limit to prevent stack blow-up on adversarial input.