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