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