Debian Codegraph @

third_party/rust/wasmparser/src/collections/mod.rs

raw
1 //! Type definitions for maps and sets used by the `wasmparser` crate.
2 //!
3 //! This module contains type definitions for [`Map`], [`Set`], [`IndexMap`], and [`IndexSet`].
4 //! These types are thin-wrappers around either hash-map based or B-tree-map based data structures.
5 //! Users can strictly use the `btree`-map based variants by enabling the `no-hash-maps` crate feature.
6 //!
7 //! - [`Map`]: Either backed by [`hashbrown::HashMap`] or Rust's [`BTreeMap`].
8 //! - [`Set`]: Either backed by [`hashbrown::HashSet`] or Rust's [`BTreeSet`].
9 //! - [`IndexMap`]: Either backed by [`indexmap::IndexMap`] or a custom implementation based on Rust's [`BTreeMap`].
10 //! - [`IndexSet`]: Either backed by [`indexmap::IndexSet`] or a custom implementation based on Rust's [`BTreeMap`].
11 //!
12 //! For the hash-map based type definitions the hash algorithm type parameter is fixed.
13 //!
14 //! [`BTreeMap`]: alloc::collections::BTreeMap
15 //! [`BTreeSet`]: alloc::collections::BTreeSet
16
17 pub mod hash;
18 pub mod index_map;
19 pub mod index_set;
20 pub mod map;
21 pub mod set;
22
23 #[doc(inline)]
24 pub use self::{index_map::IndexMap, index_set::IndexSet, map::Map, set::Set};