cvx_core/
lib.rs

1//! # `cvx-core` — Core types, traits, configuration, and error handling for ChronosVector.
2//!
3//! This crate defines the foundational abstractions used across all other CVX crates.
4//! It has **no dependencies on other workspace crates** — all other crates depend on it.
5//!
6//! ## Modules
7//!
8//! - [`types`] — Core data types: [`TemporalPoint`], [`DeltaEntry`], [`EntityTimeline`],
9//!   [`ChangePoint`], [`ScoredResult`]
10//! - [`traits`] — Trait definitions: [`DistanceMetric`], [`VectorSpace`], [`StorageBackend`],
11//!   [`IndexBackend`], [`AnalyticsBackend`]
12//! - [`config`] — Configuration: [`CvxConfig`] (deserializable from TOML)
13//! - [`error`] — Error types: [`CvxError`], [`CvxResult`]
14//!
15//! ## Design Principles
16//!
17//! - **Domain-agnostic**: CVX knows about temporal vector trajectories, not about
18//!   finance, NLP, or medicine. Domain-specific concepts are compositions of these primitives.
19//! - **Typed errors**: Every subsystem has its own error type that converts into [`CvxError`].
20//! - **Serializable**: All core types implement `serde::Serialize` + `serde::Deserialize`.
21
22#![deny(unsafe_code)]
23#![warn(missing_docs)]
24
25pub mod config;
26pub mod error;
27pub mod traits;
28pub mod types;
29
30// Re-export commonly used types at crate root for ergonomics.
31pub use config::CvxConfig;
32pub use error::{CvxError, CvxResult};
33pub use traits::{
34    AnalyticsBackend, DistanceMetric, EmbedError, Embedder, IndexBackend, StorageBackend,
35    TemporalIndexAccess, TemporalSearch, TrajectoryAccess, VectorSpace,
36};
37pub use types::{
38    ChangePoint, CpdMethod, DeltaEntry, DenseVector, EntityTimeline, MetadataFilter,
39    MetadataPredicate, ScoredResult, TemporalFilter, TemporalPoint,
40};