|
14 | 14 | //! [`IndexSet`]: set/struct.IndexSet.html
|
15 | 15 | //!
|
16 | 16 | //!
|
17 |
| -//! ### Feature Highlights |
| 17 | +//! ### Highlights |
18 | 18 | //!
|
19 | 19 | //! [`IndexMap`] and [`IndexSet`] are drop-in compatible with the std `HashMap`
|
20 | 20 | //! and `HashSet`, but they also have some features of note:
|
|
26 | 26 | //! - The [`MutableKeys`][map::MutableKeys] trait, which gives opt-in mutable
|
27 | 27 | //! access to hash map keys.
|
28 | 28 | //!
|
| 29 | +//! ### Feature Flags |
| 30 | +//! |
| 31 | +//! To reduce the amount of compiled code in the crate by default, certain |
| 32 | +//! features are gated behind [feature flags]. These allow you to opt in to (or |
| 33 | +//! out of) functionality. Below is a list of the features available in this |
| 34 | +//! crate. |
| 35 | +//! |
| 36 | +//! * `std`: Enables features which require the Rust standard library. For more |
| 37 | +//! information see the section on [`no_std`]. |
| 38 | +//! * `rayon`: Enables parallel iteration and other parallel methods. |
| 39 | +//! * `serde`: Adds implementations for [`Serialize`] and [`Deserialize`] |
| 40 | +//! to [`IndexMap`] and [`IndexSet`]. Alternative implementations for |
| 41 | +//! (de)serializing [`IndexMap`] as an ordered sequence are available in the |
| 42 | +//! [`serde_seq`] module. |
| 43 | +//! |
| 44 | +//! _Note: only the `std` feature is enabled by default._ |
| 45 | +//! |
| 46 | +//! [feature flags]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section |
| 47 | +//! [`no_std`]: #no-standard-library-targets |
| 48 | +//! [`Serialize`]: `::serde::Serialize` |
| 49 | +//! [`Deserialize`]: `::serde::Deserialize` |
| 50 | +//! |
29 | 51 | //! ### Alternate Hashers
|
30 | 52 | //!
|
31 | 53 | //! [`IndexMap`] and [`IndexSet`] have a default hasher type `S = RandomState`,
|
|
0 commit comments