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
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![warn(clippy::all)]
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
mod blob;
mod error;
mod record;
mod storage;
pub use blob::{filter, Entry};
pub use error::{Error, Kind as ErrorKind};
pub use record::Meta;
pub use rio;
pub use storage::{Builder, Key, Storage};
mod prelude {
pub(crate) use super::*;
pub(crate) use std::collections::BTreeMap;
pub(crate) const ORD: Ordering = Ordering::Relaxed;
pub(crate) use anyhow::{Context as ErrorContexts, Result};
pub(crate) use bincode::{deserialize, serialize, serialize_into, serialized_size};
pub(crate) use blob::{self, Blob, BloomConfig};
pub(crate) use crc::crc32::checksum_castagnoli as crc32;
pub(crate) use futures::{
future,
lock::Mutex,
stream::{futures_unordered::FuturesUnordered, TryStreamExt},
};
pub(crate) use record::{Header as RecordHeader, Record};
pub(crate) use rio::Rio;
pub(crate) use std::{
cmp::Ordering as CmpOrdering,
collections::HashMap,
convert::TryInto,
fmt::{Debug, Display, Formatter, Result as FmtResult},
fs::{File as StdFile, Metadata, OpenOptions as StdOpenOptions},
io::Result as IOResult,
marker::PhantomData,
os::unix::fs::OpenOptionsExt,
path::{Path, PathBuf},
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering},
Arc,
},
time::Duration,
};
pub(crate) use thiserror::Error;
pub(crate) use tokio::{
fs::{read_dir, DirEntry, File as TokioFile, OpenOptions},
stream::StreamExt,
sync::RwLock,
time::interval,
};
}