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
//! This crate repackages standard data structures with additional capabilities,
//! like fast ordered maps and sets.
//!
//! [`OrdHashSet`] uses a [`Vec`] internally for ordering.
//! [`OrdHashSet`] and [`OrdHashMap`] both implement a `bisect` method
//! which allows looking up a key by comparison,
//! potentially avoiding the need for a heap allocation to construct a search key..
//!
//! Features:
//! - `all`: enables all features
//! - `serialize`: enables support for [`serde`](https://docs.rs/serde/).
//! - `stream`: enables support for [`destream`](https://docs.rs/destream/).
//! - `hash`: enables support for [`async-hash`](https://docs.rs/async-hash/).
//!
//!
//! Example usage:
//! ```
//! use ds_ext::*;
//!
//! let mut set = OrdHashSet::new();
//! assert!(set.is_empty());
//!
//! set.insert(1);
//! assert!(set.contains(&1));
//! assert_eq!(set.len(), 1);
//!
//! let mut map = OrdHashMap::from_iter(set.into_iter().map(|i| (i, i)));
//! assert_eq!(map.len(), 1);
//!
//! assert_eq!(map.get(&1), map.bisect(|i| 1.partial_cmp(i)));
//! ```
pub use OrdHashMap;
pub use LinkedHashMap;
pub use OrdHashSet;