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 sanitize;
21pub mod serialize;
22pub mod traits;
23pub mod types;
24pub mod validate;
25pub mod value;
26pub mod visitor;
27
28// testing
29#[cfg(test)]
30pub(crate) mod testing;
31
32///
33/// CONSTANTS
34///
35
36/// Maximum number of indexed fields allowed on an entity.
37///
38/// This limit keeps hashed index keys within bounded, storable sizes and
39/// simplifies sizing tests in the stores.
40pub const MAX_INDEX_FIELDS: usize = 4;
41
42///
43/// Prelude
44///
45/// Prelude contains only domain vocabulary.
46/// No errors, executors, stores, serializers, or helpers are re-exported here.
47///
48
49pub mod prelude {
50    pub use crate::{
51        model::{entity::EntityModel, index::IndexModel},
52        traits::{EntityIdentity, EntityKind, Path},
53        value::Value,
54    };
55}