hap-tlv8
HomeKit Accessory Protocol (HAP) TLV8 encoder and decoder, with automatic
255-byte fragmentation and separator handling. Milestone 1 of
hap-rust.
Format
A TLV8 stream is a sequence of (type: u8, length: u8, value) items. Values
longer than 255 bytes fragment across consecutive same-type items; a
zero-length item of type 0xFF separates repeated structures.
Example
use ;
let mut bytes = Vecnew;
let mut w = new;
w.push_u8; // State = 1
w.push_u8; // Method = Pair Setup
let items = parse.unwrap;
assert_eq!;
License
Apache-2.0.