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
//! Concurrent ordered map and set collections implemented as a B-link tree.
//!
//! [`BLinkMap`] and [`BLinkSet`] use per-page read/write latches, two-sided
//! fences, right-sibling links, and forwarding pages. Readers correct stale
//! routes while concurrent writers split, rotate, merge, and unlink pages.
//!
//! Entry lookups return [`EntryRef`] or [`EntryMut`] guards. These guards make
//! borrowed access safe without cloning values, but they lock an entire leaf.
//! Drop them before re-entering the map for a potentially conflicting operation.
//!
//! ```
//! use b_link::{BLinkMap, BLinkSet};
//!
//! let map = BLinkMap::<u64, &str>::new();
//! assert_eq!(map.insert(7, "seven"), None);
//! assert_eq!(map.get(&7).map(|entry| *entry), Some("seven"));
//! assert_eq!(map.remove(&7), Some("seven"));
//!
//! let set = BLinkSet::<u64>::new();
//! assert!(set.insert(7));
//! assert!(set.contains(&7));
//! ```
pub use ;
pub use ;
pub use ;
pub use ;