Expand description
Wire format constants and documentation. Canonical binary format rules.
Version 0.1 intentionally defines one binary representation per supported value:
- integers are fixed-width little-endian,
boolis exactly0x00or0x01,- strings are UTF-8 bytes prefixed by a
u32little-endian byte length, - vectors are prefixed by a
u32little-endian item count, Option<T>andResult<T, E>use one-byte tags,- fixed arrays and tuples encode fields in declaration order.
Floats, pointer-sized integers, hash maps, unordered maps, schema negotiation, and non-canonical alternatives are not part of this initial format. They are omitted because their representation or ordering can be platform-dependent, ambiguous, or outside this crate’s first-version scope.
Generic fixed-array decoding ([T; N]) requires the alloc feature in this
version because the crate forbids unsafe code and Rust 1.85 does not provide
a stable fallible array initializer. In no-alloc builds, [u8; N] decoding is
available because it can be filled directly from the source without heap
allocation.
Constants§
- BOOL_
FALSE - Tag used for
false. - BOOL_
TRUE - Tag used for
true. - OPTION_
NONE - Tag used for
None. - OPTION_
SOME - Tag used for
Some. - RESULT_
ERR - Tag used for
Err. - RESULT_
OK - Tag used for
Ok.