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
//! # RART - Ryan's Adaptive Radix Tree
//!
//! A high-performance, memory-efficient implementation of Adaptive Radix Trees (ART) in Rust.
//!
//! ## Overview
//!
//! Adaptive Radix Trees are a type of trie data structure that automatically adjusts
//! its internal representation based on the number of children at each node, providing
//! excellent performance characteristics:
//!
//! - **Space efficient**: Compact representation that adapts to data density
//! - **Cache friendly**: Optimized memory layout for modern CPU architectures
//! - **Fast operations**: O(k) complexity where k is the key length
//! - **Range queries**: Efficient iteration over key ranges
//!
//! ## Quick Start
//!
//! ```rust
//! use rart::{AdaptiveRadixTree, ArrayKey};
//!
//! // Create a new tree with fixed-size keys
//! let mut tree = AdaptiveRadixTree::<ArrayKey<16>, String>::new();
//!
//! // Insert some data
//! tree.insert("hello", "world".to_string());
//! tree.insert("foo", "bar".to_string());
//!
//! // Query the tree
//! debug_assert_eq!(tree.get("hello"), Some(&"world".to_string()));
//! debug_assert_eq!(tree.get("missing"), None);
//!
//! // Iterate over entries
//! for (key, value) in tree.iter() {
//! println!("{:?} -> {}", key.as_ref(), value);
//! }
//! ```
//!
//! ## Key Types
//!
//! RART supports two main key types:
//!
//! - [`ArrayKey<N>`]: Fixed-size keys up to N bytes, stack-allocated
//! - [`VectorKey`]: Variable-size keys, heap-allocated
//!
//! Both key types support automatic conversion from common Rust types:
//!
//! ```rust
//! use rart::{ArrayKey, VectorKey};
//!
//! // From string literals
//! let key1: ArrayKey<16> = "hello".into();
//! let key2: VectorKey = "world".into();
//!
//! // From numeric types
//! let key3: ArrayKey<8> = 42u64.into();
//! let key4: VectorKey = 1337u32.into();
//! ```
// Private implementation modules
// Internal modules (public for benchmarking, not part of stable API)
// Public API modules
// Re-export main types for convenience
pub use LendingKeyView;
pub use ;
pub use Partial;
pub use AdaptiveRadixTree;
pub use VersionedAdaptiveRadixTree;