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
93#[doc(hidden)]
94pub mod descriptor_table;
95
96mod double_ended_peekable;
97mod error;
98
99#[doc(hidden)]
100pub mod file;
101
102mod hash;
103mod iter_guard;
104mod key;
105mod key_range;
106mod manifest;
107mod memtable;
108mod run_reader;
109mod run_scanner;
110
111#[doc(hidden)]
112pub mod merge;
113
114#[cfg(feature = "metrics")]
115pub(crate) mod metrics;
116
117#[doc(hidden)]
120pub mod mvcc_stream;
121
122mod path;
123
124#[doc(hidden)]
125pub mod range;
126
127#[doc(hidden)]
128pub mod table;
129
130mod seqno;
131mod slice;
132mod slice_windows;
133
134#[doc(hidden)]
135pub mod stop_signal;
136
137mod format_version;
138mod time;
139mod tree;
140
141pub mod util;
143
144mod value;
145mod value_type;
146mod version;
147mod vlog;
148
149pub type UserKey = Slice;
151
152pub type UserValue = Slice;
154
155pub type KvPair = (UserKey, UserValue);
157
158#[doc(hidden)]
159pub use {
160 blob_tree::{handle::BlobIndirection, Guard as BlobGuard},
161 checksum::Checksum,
162 iter_guard::IterGuardImpl,
163 key_range::KeyRange,
164 merge::BoxedIterator,
165 slice::Builder,
166 table::{GlobalTableId, Table, TableId},
167 tree::ingest::Ingestion,
168 tree::inner::TreeId,
169 tree::Guard as StandardGuard,
170 value::InternalValue,
171};
172
173pub use {
174 any_tree::AnyTree,
175 blob_tree::BlobTree,
176 cache::Cache,
177 compression::CompressionType,
178 config::{Config, KvSeparationOptions, TreeType},
179 descriptor_table::DescriptorTable,
180 error::{Error, Result},
181 format_version::FormatVersion,
182 iter_guard::IterGuard as Guard,
183 memtable::Memtable,
184 r#abstract::AbstractTree,
185 seqno::SequenceNumberCounter,
186 slice::Slice,
187 tree::Tree,
188 value::SeqNo,
189 value_type::ValueType,
190 vlog::BlobFile,
191};
192
193#[cfg(feature = "metrics")]
194pub use metrics::Metrics;