musli_zerocopy/phf/
mod.rs

1//! A ZeroCopy [`Map`] and [`Set`] based on a perfect hash functions.
2//!
3//! While these maps can be incredibly performant, they can be incredibly
4//! expensive to build. So avoid these if you're storing many elements.
5//!
6//! For very large maps and sets, prefer to use [`swiss`] instead.
7//!
8//! [`swiss`]: crate::swiss
9
10// Map internals copied from rust-phf under the MIT license.
11//
12// See:
13// https://github.com/rust-phf/rust-phf/tree/b7116ff519415d302c070aa313831cd473b1a911
14
15#[cfg(feature = "alloc")]
16pub(crate) mod generator;
17
18pub(crate) mod hashing;
19
20pub(crate) use self::entry::Entry;
21mod entry;
22
23#[doc(inline)]
24pub use self::map::{Map, MapRef};
25pub mod map;
26
27#[doc(inline)]
28pub use self::set::{Set, SetRef};
29pub mod set;
30
31#[cfg(feature = "alloc")]
32#[doc(inline)]
33pub use self::factory::*;
34#[cfg(feature = "alloc")]
35mod factory;