Module tag

Source

Macros§

make 🔒
Generate an enum implementing Tag, enforcing at compile time that the discriminant values are distinct.

Traits§

Tag
A type implementing Tag represents a static hash set of byte strings, with a very simple perfect hash function: every element has a unique discriminant at a common byte offset. The values of the type represent the members by this single discriminant byte; they are indices into the hash set.

Functions§

buf_of
Minimum buffer size to contain either of 0..Tag::MIN and Tag::MIN.. at a particular time, for all possible tag wire representations, given the sizes of all wire representations.
max_of 🔒
Maximum element of a slice
min_of
Minimum element of a slice