grafeo_common/lib.rs
1//! # grafeo-common
2//!
3//! The foundation layer - types and utilities used everywhere in Grafeo.
4//!
5//! You probably don't need to use this crate directly. The main `grafeo` crate
6//! re-exports the types you'll actually use ([`NodeId`], [`EdgeId`], [`Value`]).
7//!
8//! If you're building extensions or diving into internals, here's what's here:
9//!
10//! ## Modules
11//!
12//! - [`types`] - Core types: [`NodeId`], [`EdgeId`], [`Value`], [`PropertyKey`]
13//! - [`collections`] - Type aliases for hash maps/sets with consistent hashing
14//! - [`memory`] - Allocators for performance-critical paths (arenas, pools)
15//! - [`mvcc`] - Version chains for snapshot isolation
16//! - [`utils`] - Hashing, error types, and other helpers
17
18#![deny(unsafe_code)]
19
20pub mod collections;
21pub mod fmt;
22pub mod memory;
23pub mod mvcc;
24pub mod types;
25pub mod utils;
26
27// The types you'll use most often
28pub use mvcc::{Version, VersionChain, VersionInfo};
29pub use types::{
30 EdgeId, EpochId, LogicalType, NodeId, PropertyKey, Timestamp, TransactionId, Value,
31};
32pub use utils::error::{Error, Result};
33
34// Tiered storage types (feature-gated)
35#[cfg(feature = "tiered-storage")]
36pub use mvcc::{ColdVersionRef, HotVersionRef, OptionalEpochId, VersionIndex, VersionRef};