reifydb_codec/encoded/mod.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 ReifyDB
3
4//! Canonical on-disk and on-wire byte layouts for every primitive value the database stores or transmits.
5//!
6//! There is one submodule per primitive kind: signed and unsigned integers from 8 to 128 bits, IEEE floats, booleans,
7//! variable-length blobs and UTF-8 strings, decimals, the temporal family (date, datetime, time, duration), the UUID
8//! variants, identity and dictionary references, the arbitrary-precision integer wrappers, the typed-row and shape
9//! envelopes, the typed-key encoding, the `any`-tagged variant for heterogeneous columns, and the `undefined` sentinel.
10//! Each submodule supplies the encode and decode routines that take a typed value to the bytes that go to disk,
11//! replication, CDC, and the wire protocol, and back again.
12//!
13//! Invariant: once a primitive's byte layout has shipped, it is the format used by storage, replication, CDC, and the
14//! wire protocol simultaneously. Any change is a coordinated cross-format break that requires a migration; consumers
15//! must continue to round-trip every previously-written byte sequence forever.
16
17pub mod any;
18pub mod blob;
19pub mod boolean;
20pub mod date;
21pub mod datetime;
22pub mod decimal;
23pub mod dictionary_id;
24pub mod duration;
25pub mod f32;
26pub mod f64;
27pub mod i128;
28pub mod i16;
29pub mod i32;
30pub mod i64;
31pub mod i8;
32pub mod identity;
33pub mod int;
34pub mod row;
35pub mod shape;
36pub mod time;
37pub mod u128;
38pub mod u16;
39pub mod u32;
40pub mod u64;
41pub mod u8;
42pub mod uint;
43pub mod undefined;
44pub mod utf8;
45pub mod uuid4;
46pub mod uuid7;
47pub mod value;