1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Shared substrate for the persistent ARTrie variants.
//!
//! `persistent_artrie_core` hosts the unit-agnostic infrastructure
//! shared by the three persistent ARTrie variants:
//!
//! - [`crate::persistent_artrie`] — byte / `u8` keys
//! - [`crate::persistent_artrie_char`] — UTF-8 / `u32` keys
//! - [`crate::persistent_vocab_artrie`] — vocabulary-specific, builds on char
//!
//! # Layering invariant
//!
//! `persistent_artrie_core` has **zero** upward dependencies on the variant
//! modules. Variants depend on core; core never depends on variants. This
//! invariant is verified by:
//!
//! ```text
//! grep -rn "crate::persistent_artrie_char\|crate::persistent_vocab" src/persistent_artrie_core/
//! ```
//!
//! which must return empty.
//!
//! # Migration
//!
//! Sub-modules are added incrementally as the multi-phase
//! `persistent_artrie_core` extraction proceeds. Until the extraction is
//! complete, the variant modules continue to re-export their original symbols
//! so existing call-sites need not change paths in lock-step with moves.
/// The shared `{i64, u64}` counter-leaf codec — the single `i128`-domain arithmetic
/// substrate every counter-leaf read/write routes through (the u64 restoration). See
/// `docs/design/counter-u64-restoration.md` and the module-level docs for the gate.
/// G4: the shared lock-free `OverlayNode<K, V>` / `AtomicNodePtr<K, V>` aliased by
/// the byte/char overlays. Gated on `persistent-artrie` like the variant node
/// modules (it depends on `arc_swap` and the overlay machinery).
/// F4 lock-collapse compat shim (`SharedTrieAccess` `.read()/.write()` on `Arc<T>`)
/// + the `AtomicEnumCell` used to wrap the `Copy`-enum Tier-2 fields. Dependency-
/// free, so unconditional (the `DurabilityPolicy` `U8Enum` impl lives in the
/// always-compiled `durability` module).
// Top-level convenience re-exports used by sub-modules via `super::`.
pub use ;