rushdb_types/lib.rs
1//! Canonical value model, identifiers, key layout, encodings, and the
2//! maintained-key constants shared by storage, LMPG, and the query engine.
3//!
4//! This crate defines the vocabulary every other crate agrees on: tenant and
5//! record/relationship identities, the order-preserving scalar encoding used
6//! by occurrence values and range scans, and the byte-exact key constructors
7//! (for example [`keys::occ_key`] and [`keys::presence_key`]). Keeping the
8//! key layout here is what lets a persisted database remain readable across
9//! engine versions.
10/// Replicated command batches, mutations and preconditions.
11pub mod command;
12/// Binary codec of [`command::CommitBatch`] for the WAL, outcome payloads
13/// and replication.
14pub mod command_codec;
15/// Canonical date/datetime parsing and formatting helpers.
16pub mod datetime;
17/// Order-preserving byte encodings for the scalar value model.
18pub mod encoding;
19/// Error type shared by the canonical type layer.
20pub mod error;
21/// Stable hashing helpers and hash domains.
22pub mod hash;
23/// Tenant, record, relationship and dense-ordinal identifiers.
24pub mod ids;
25/// Declared secondary indexes.
26pub mod index;
27/// Byte-exact key constructors for the tenant keyspace.
28pub mod keys;
29/// Logical types, catalog state, cardinality and nullability.
30pub mod model;
31/// Name tokens and spelling similarity for labels and properties.
32pub mod names;
33/// Occurrence rows, headers and property/embedding metadata.
34pub mod occurrence;
35/// Canonical tenant policy payloads for authorization.
36pub mod security;
37/// Planner value-distribution summaries (estimates, never results).
38pub mod stats;
39/// Scalar value model and JSON conversion helpers.
40pub mod value;
41/// Matching a search text against stored values.
42pub mod value_match;
43
44pub use error::TypesError;
45
46/// Convenience alias for a [`std::result::Result`] over [`TypesError`].
47pub type Result<T> = std::result::Result<T, TypesError>;