A registered extension value (tags 0xF0..0xFF).
Extension types are the forward-compatible escape hatch of the BTOON wire format: an extension value is encoded as its tag, a length prefix and the raw payload, so any decoder can skip an unimplemented extension instead of failing. The payload's internal layout is defined by the extension's registration.
Tag ranges:
0xF0–0xF7— experimental / vendor-specific0xF8–0xFB— official (registered with the maintainers)0xFC–0xFF— private / application-local
Examples
iex> ext = Btoon.Extension.new(0xF0, <<1, 2, 3>>)
iex> Btoon.decode!(Btoon.encode!(ext))
%Btoon.Extension{tag: 240, data: <<1, 2, 3>>}
Summary
Functions
The payload bytes.
Whether the byte is an extension tag.
Wraps a payload under an extension tag in 0xF0..0xFF.