Expand description
Type tags used in the senax binary format.
These tags are written as the first byte of each encoded value to identify its type and optimize decoding. Most users do not need to use these directly.
- Primitives, Option, String, Vec, arrays, maps, structs, enums, and feature types each have their own tag(s).
- Tags are stable and part of the wire format.
Constants§
- TAG_
ARRAY_ VEC_ SET_ BASE - < Short array/vec/set (length in tag) - includes HashSet, BTreeSet, IndexSet, FxHashSet, AHashSet
- TAG_
ARRAY_ VEC_ SET_ LONG - < Long array/vec/set (length encoded) - includes HashSet, BTreeSet, IndexSet, FxHashSet, AHashSet
- TAG_
BINARY - < Bytes
- TAG_
CHRONO_ DATETIME - < chrono::DateTime
- TAG_
CHRONO_ NAIVE_ DATE - < chrono::NaiveDate
- TAG_
CHRONO_ NAIVE_ DATETIME - < chrono::NaiveDateTime
- TAG_
CHRONO_ NAIVE_ TIME - < chrono::NaiveTime
- TAG_
DECIMAL - < rust_decimal::Decimal
- TAG_
ENUM - TAG_
ENUM_ NAMED - < Enum with named fields
- TAG_
ENUM_ UNNAMED - < Enum with tuple fields
- TAG_F32
- TAG_F64
- TAG_
JSON_ ARRAY - TAG_
JSON_ BOOL - TAG_
JSON_ NULL - TAG_
JSON_ NUMBER - TAG_
JSON_ OBJECT - TAG_
JSON_ STRING - TAG_MAP
- < Map (HashMap, BTreeMap, IndexMap, FxHashMap, AHashMap)
- TAG_
NEGATIVE - < Negative signed integer (bit-inverted encoding)
- TAG_
NONE - TAG_ONE
- < 1 for numbers, true for bool
- TAG_
SOME - TAG_
STRING_ BASE - < Short string (length in tag) - String, SmolStr
- TAG_
STRING_ LONG - < Long string (length encoded) - String, SmolStr
- TAG_
STRUCT_ NAMED - < Named struct
- TAG_
STRUCT_ UNIT - < Unit struct
- TAG_
STRUCT_ UNNAMED - < Tuple struct
- TAG_
TUPLE - < Tuple
- TAG_U8
- TAG_
U8_ 127 - TAG_U16
- TAG_U32
- TAG_U64
- TAG_
U128 - TAG_
UUID - < uuid::Uuid, ulid::Ulid
- TAG_
ZERO - < 0 for numbers, false for bool
Functions§
- read_
field_ id_ optimized - Reads a field ID using optimized encoding.
- read_
u32_ le - Reads a
u32in little-endian format without a tag. - read_
u64_ le - Reads a
u64in little-endian format without a tag. - skip_
value - Skips a value of any type in the senax binary format.
- write_
field_ id_ optimized - Writes a
u64in little-endian format without a tag. - write_
u32_ le - Writes a
u32in little-endian format without a tag. - write_
u64_ le - Writes a
u64in little-endian format without a tag.