wasmparser/collections/
mod.rs

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
17pub mod hash;
18pub mod index_map;
19pub mod index_set;
20pub mod map;
21pub mod set;
22
23#[doc(inline)]
24pub use self::{index_map::IndexMap, index_set::IndexSet, map::Map, set::Set};