Skip to main content

icydb_core/
lib.rs

1//! Module: lib
2//! Responsibility: module-local ownership and contracts for lib.
3//! Does not own: cross-module orchestration outside this module.
4//! Boundary: exposes this module API while keeping implementation details internal.
5
6//! Core runtime for IcyDB: entity traits, values, executors, visitors, and
7//! the ergonomics exported via the `prelude`.
8#![warn(unreachable_pub)] // too complex to adhere to right now
9
10extern crate self as icydb;
11
12#[macro_use]
13pub(crate) mod scalar_registry;
14
15// public exports are one module level down
16pub mod db;
17pub mod error;
18pub mod metrics;
19pub mod model;
20pub mod patch;
21pub mod sanitize;
22pub mod serialize;
23pub mod traits;
24pub mod types;
25pub mod validate;
26pub mod value;
27pub mod visitor;
28
29// testing
30#[cfg(test)]
31pub(crate) mod testing;
32
33///
34/// CONSTANTS
35///
36
37/// Maximum number of indexed fields allowed on an entity.
38///
39/// This limit keeps hashed index keys within bounded, storable sizes and
40/// simplifies sizing tests in the stores.
41pub const MAX_INDEX_FIELDS: usize = 4;
42
43///
44/// Prelude
45///
46/// Prelude contains only domain vocabulary.
47/// No errors, executors, stores, serializers, or helpers are re-exported here.
48///
49
50pub mod prelude {
51    pub use crate::{
52        model::{entity::EntityModel, index::IndexModel},
53        traits::{EntityIdentity, EntityKind, Path},
54        value::Value,
55    };
56}