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
/// # Example
///
/// ```rust
///
/// #[tokio::main]
/// async fn main() {
///
///
/// let dl = RConcurrentStorage::<Document>::open("tester".to_owned(), 1000).await;
///
/// // Insert / Update
/// let _ = dl.insert_entry(format!("102xa"), Document::new()).await;
///
/// // Remove
/// dl.remove_entry(&format("102xa")).await;
///
///
/// // Read
/// dl.table.read().await
/// .iter()
/// .for_each(|(key, doc)| {
/// println!("==> {} -> {}", key, &doc.funame)
// });
///
/// }
///
///
/// #[derive(Serialize, Deserialize, Clone)]
/// struct Document {
/// funame: String,
/// age: i32,
/// }
/// impl Document {
/// pub fn new() -> Self {
/// Document {
/// funame: String::from("DanyalMhai@gmail.com"),
/// age: 24,
/// }
/// }
/// }
///
/// ```
///
/// Optimized for Read Heavy Concurrent
pub use RConcurrentStorage;
/// Optimized for Write Heavy Concurrent
pub use WConcurrentStorage;