tephra_types/lib.rs
1//! Shared vocabulary for tephra: the concepts a client and the storage engine both speak.
2//!
3//! This crate is pure data and validation with no I/O and no storage machinery, so a
4//! client can link it (and the wire protocol) without pulling in the engine. It holds the
5//! [`Position`] type, the event [`EventType`]/[`Tag`] names and the sorted [`Tags`] set,
6//! and the [`Query`] model ([`Query`], [`QueryItem`], [`AppendCondition`]).
7//!
8//! The engine re-exports these types, so `tephra::Query` and [`tephra_types::Query`](Query)
9//! are the same type. Name and tag validation ([`EventType::new`], [`Tag::new`],
10//! [`Tags::new`]) lives here as the single source of truth for both sides.
11
12pub mod name;
13pub mod position;
14pub mod query;
15
16pub use name::{EventType, MAX_NAME_LEN, NameError, Tag, Tags, TagsError};
17pub use position::Position;
18pub use query::{AppendCondition, Query, QueryItem};
19
20/// The README, compiled as a doctest so its code samples cannot drift from the API. Present
21/// only during doctest builds (`cfg(doctest)`), so it never appears in the published docs.
22#[cfg(doctest)]
23#[doc = include_str!("../README.md")]
24struct CrateReadme;