Skip to main content

icydb_core/
lib.rs

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