astraea_core/lib.rs
1//! Foundational types and traits shared across every AstraeaDB crate.
2//!
3//! Exposes the core ID newtypes (`NodeId`, `EdgeId`, `PageId`, `Lsn`,
4//! `TransactionId`), the `Node` / `Edge` / `GraphPath` records, the
5//! `Direction` and `DistanceMetric` enums, and the central traits:
6//! `StorageEngine`, `TransactionalEngine`, `GraphOps`, and
7//! `VectorIndex`. `AstraeaError` plus the `Result` alias are the
8//! crate-wide error type; downstream crates should never define their
9//! own.
10//!
11//! Invariants: `NodeId` and `EdgeId` are opaque `u64` newtypes with no
12//! density or ordering guarantees, and IDs are always **server-assigned**
13//! by `GraphOps::create_node` / `create_edge` — clients never supply
14//! them. Node `embedding` dimension is pinned by the HNSW index on first
15//! insert; do not mix dimensions within a single store.
16
17pub mod error;
18pub mod traits;
19pub mod types;
20
21// Re-export commonly used items at the crate root.
22pub use error::{AstraeaError, Result};
23pub use types::*;