Expand description
This module provides helpers for namespace table.
Constantsยง
- NS_
ID_ ๐BYTE_ LEN - NS_
OFFSET_ ๐BYTE_ LEN - NUM_
NSS_ ๐BYTE_ LEN - Byte lengths for the different items that could appear in a namespace table.
Functionsยง
- ns_
table_ ๐offsets - The namespace end offsets
bytesencodes, in order.Noneifbytesis not a namespace table: too short, an entry count that disagrees with its length, or offsets that decrease. - ns_
table_ payload_ byte_ len - The payload length
bytesclaims to be the namespace table of: its final offset, or zero for a table with no entries.Noneifbytesis not a namespace table at all. - parse_
ns_ table - Helper function for AvidM scheme to parse a namespace table.
If the namespace table is invalid, it returns a default single entry namespace table.
For details, please refer to
block/full_payload/ns_table.rsin thesequencercrate. - single_
ns_ ๐table