1#![doc(html_logo_url = "https://raw.githubusercontent.com/fjall-rs/lsm-tree/main/logo.png")]
36#![doc(html_favicon_url = "https://raw.githubusercontent.com/fjall-rs/lsm-tree/main/logo.png")]
37#![deny(clippy::all, missing_docs, clippy::cargo)]
38#![deny(clippy::unwrap_used)]
39#![deny(clippy::indexing_slicing)]
40#![warn(clippy::pedantic, clippy::nursery)]
41#![warn(clippy::expect_used)]
42#![allow(clippy::missing_const_for_fn)]
43#![warn(clippy::multiple_crate_versions)]
44#![allow(clippy::option_if_let_else)]
45#![warn(clippy::redundant_feature_names)]
46#[doc(hidden)]
51pub type HashMap<K, V> = std::collections::HashMap<K, V, rustc_hash::FxBuildHasher>;
52
53pub(crate) type HashSet<K> = std::collections::HashSet<K, rustc_hash::FxBuildHasher>;
54
55macro_rules! fail_iter {
56 ($e:expr) => {
57 match $e {
58 Ok(v) => v,
59 Err(e) => return Some(Err(e.into())),
60 }
61 };
62}
63
64macro_rules! unwrap {
65 ($x:expr) => {{
66 $x.expect("should read")
67 }};
68}
69
70pub(crate) use unwrap;
71
72mod any_tree;
73
74mod r#abstract;
75
76#[doc(hidden)]
77pub mod blob_tree;
78
79#[doc(hidden)]
80mod cache;
81
82mod checksum;
83
84#[doc(hidden)]
85pub mod coding;
86
87pub mod compaction;
88mod compression;
89
90pub mod config;
92
93mod double_ended_peekable;
94
95mod error;
96
97#[doc(hidden)]
98pub mod file;
99
100mod hash;
101
102mod iter_guard;
103
104mod key;
105mod key_range;
106
107mod run_reader;
108mod run_scanner;
109
110mod manifest;
111mod memtable;
112
113#[doc(hidden)]
114pub mod descriptor_table;
115
116#[doc(hidden)]
117pub mod merge;
118
119#[cfg(feature = "metrics")]
120pub(crate) mod metrics;
121
122#[doc(hidden)]
125pub mod mvcc_stream;
126
127mod path;
128
129#[doc(hidden)]
130pub mod range;
131
132#[doc(hidden)]
133pub mod table;
134
135mod seqno;
136mod slice;
137mod slice_windows;
138
139#[doc(hidden)]
140pub mod stop_signal;
141
142mod format_version;
143mod time;
144mod tree;
145
146pub mod util;
148
149mod value;
150mod value_type;
151mod version;
152mod vlog;
153
154pub type UserKey = Slice;
156
157pub type UserValue = Slice;
159
160pub type KvPair = (UserKey, UserValue);
162
163#[doc(hidden)]
164pub use {
165 blob_tree::handle::BlobIndirection,
166 checksum::Checksum,
167 key_range::KeyRange,
168 merge::BoxedIterator,
169 slice::Builder,
170 table::{GlobalTableId, Table, TableId},
171 tree::ingest::Ingestion,
172 tree::inner::TreeId,
173 value::InternalValue,
174};
175
176pub use {
177 any_tree::AnyTree,
178 blob_tree::BlobTree,
179 cache::Cache,
180 compression::CompressionType,
181 config::{Config, KvSeparationOptions, TreeType},
182 descriptor_table::DescriptorTable,
183 error::{Error, Result},
184 format_version::FormatVersion,
185 iter_guard::IterGuard as Guard,
186 memtable::Memtable,
187 r#abstract::AbstractTree,
188 seqno::SequenceNumberCounter,
189 slice::Slice,
190 tree::Tree,
191 value::SeqNo,
192 value_type::ValueType,
193 vlog::BlobFile,
194};
195
196#[cfg(feature = "metrics")]
197pub use metrics::Metrics;