Skip to main content

laminar_core/
lib.rs

1//! Core streaming engine for `LaminarDB`.
2
3#![deny(missing_docs)]
4#![warn(clippy::all, clippy::pedantic)]
5#![allow(clippy::duration_suboptimal_units)] // MSRV 1.85; from_mins/from_hours are 1.91+
6#![allow(clippy::module_name_repetitions)]
7// Allow unsafe in alloc module for zero-copy optimizations
8#![allow(unsafe_code)]
9
10pub mod alloc;
11/// Distributed checkpoint barrier protocol.
12pub mod checkpoint;
13/// Structured error code registry (`LDB-NNNN`) and Ring 0 hot path error type.
14pub mod error_codes;
15/// Lookup table types and predicate pushdown.
16pub mod lookup;
17pub mod mv;
18pub mod operator;
19/// Shared Arrow IPC serialization for `RecordBatch` ↔ bytes.
20pub mod serialization;
21/// Cross-instance shuffle: message codec, credit flow, wire protocol.
22pub mod shuffle;
23/// Pluggable state backend (`StateBackend` trait + impls).
24pub mod state;
25pub mod streaming;
26pub mod time;
27
28/// Distributed cluster coordination. Unstable: gated behind `cluster-unstable`.
29#[cfg(feature = "cluster-unstable")]
30pub mod cluster;
31
32/// Result type for laminar-core operations
33pub type Result<T> = std::result::Result<T, Error>;
34
35/// Error types for laminar-core
36#[derive(Debug, thiserror::Error)]
37pub enum Error {
38    /// Operator errors
39    #[error("Operator error: {0}")]
40    Operator(#[from] operator::OperatorError),
41
42    /// Time-related errors
43    #[error("Time error: {0}")]
44    Time(#[from] time::TimeError),
45
46    /// Materialized view errors
47    #[error("MV error: {0}")]
48    Mv(#[from] mv::MvError),
49}