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