Skip to main content

content_addressable/
structures.rs

1//! The Merkle structure catalog — the sub-manifest that keeps the crate root
2//! bounded as the catalog grows (epic #30).
3//!
4//! # Invariant: adding a structure never touches `src/lib.rs`
5//!
6//! Each catalog structure (Merkle Mountain Range, hash chain, sparse Merkle
7//! tree, Merkle-clock, …) is a feature-gated module declared **here**, in a
8//! sibling file `src/structures/<name>.rs`. The crate root carries a single
9//! `pub mod structures;` line and nothing per structure, so `lib.rs` stays a
10//! fixed-size manifest while this file absorbs the O(N) growth of the catalog.
11//!
12//! Structures are reached at their path
13//! (`content_addressable::structures::mmr::Mmr`) and are **not** flattened into
14//! the frozen crate-root facade — the minimal-surface principle applied to the
15//! public API, so the root's stable spine does not grow with the catalog.
16//!
17//! See `WORKSPACE_RULES.md` → "Composition roots are manifests, not members".
18//!
19//! Members land here as their issues do — the first is #45 (Merkle Mountain
20//! Range), then #56 (Merkle-clock), and the rest of the Phase 2+ catalog. Until
21//! the first lands this is an intentionally empty manifest: the scaffold that
22//! lets structure #1 register with a one-line edit to *this* file, never the
23//! crate root.
24//!
25//! ```text
26//! // when #45 lands, it adds exactly one line here:
27//! #[cfg(feature = "mmr")]
28//! pub mod mmr;
29//! ```