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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// Copyright (C) 2024-2025 Greg Burd. Licensed under either of the
// Apache License, Version 2.0 or the MIT license, at your option.
// See LICENSE-APACHE and LICENSE-MIT at the root of this repository.
// SPDX-License-Identifier: Apache-2.0 OR MIT
//! > **Internal component of the [`noxu`](https://crates.io/crates/noxu) database.**
//! >
//! > This crate is published only so the `noxu` umbrella crate can depend on it.
//! > Use `noxu` (`noxu = "3"`) in applications; depend on this crate directly only
//! > if you are extending the engine internals. Its API may change without a major
//! > version bump.
//!
//! B-tree implementation for Noxu DB.
//!
//! the main in-memory cache containing
//! persistent B-tree nodes (IN, BIN, LN) and access methods.
//!
//! # Module Structure
//!
//! - `error` - Tree error types
//! - `entry_states` - Slot state bit flags (KD, PD, dirty, embedded)
//! - `key` - Key comparison and prefix utilities
//! - `node` - Base node types and ID generation
//! - `child_reference` - Reference from parent to child node
//! - `in_node` - Internal Node (core B-tree node)
//! - `ln` - Leaf Node (data records)
//! - `tree` - B+tree operations (search, insert, split)
//!
//! # Architecture
//!
//! The tree is structured as a B+tree with:
//! - Internal Nodes (IN) at higher levels
//! - Bottom Internal Nodes (BIN) at the leaf level
//! - Leaf Nodes (LN) containing actual data
//!
//! The tree uses latch-coupling for concurrent access and supports
//! splits, compression, and efficient caching.
// Error types
// Foundation types - implemented by other agents
// Tree node references
// Foundation utility modules
// Tree nodes
// Leaf nodes - implemented by other agents
// Tree operations
// Re-exports for convenience
pub use TreeError;
pub use Ln;
pub use InListListener;
// Re-export from other agent modules (if they compile)
pub use ;
pub use MapLn;
pub use NameLn;
pub use ;
pub use make_versioned_ln;
// Tree types
pub use ;
// Tree node level constants and search-result flags. These are defined in
// `tree` (the runtime implementation); the former `in_node` definitions were
// removed with the shelved faithful `InNode` (T-1).
pub use ;
// Re-export foundation types
pub use ChildReference;
pub use SlotState;
pub use KeyComparator;
pub use ;
pub use SearchResult;
pub use TreeLocation;
// Re-export the RwLock used for tree nodes so downstream crates can reference
// the same type without depending on parking_lot directly.
pub use RwLock as NodeRwLock;