Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ pub use crate::raw_entry::*;
/// panic does occur then the contents of the `HashMap` may become corrupted and
/// some items may be dropped from the table.
///
/// # Compatibility notes
///
/// While it seems likely that the map will provide stable ordering between
/// different types of iteration, at least without any addition/removal of
/// keys, you should not rely on this in practice. Even if such behavior is
/// unlikely to occur, you should expect:
///
/// * Cloned maps/iterators to have different iteration order
/// * Identical methods to have different orderings between calls
/// * A general inability to correlate orderings between different methods
///
/// If you're interested in these sorts of guarantees, you should seek
/// alternative map implementations like the `IndexMap` mentioned in the
/// corresponding [`HashTable`](crate::HashTable) docs.
///
/// # Examples
///
/// ```
Expand Down
15 changes: 15 additions & 0 deletions src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ use crate::raw::RawExtractIf;
/// panic does occur then the contents of the `HashSet` may become corrupted and
/// some items may be dropped from the table.
///
/// # Compatibility notes
///
/// While it seems likely that the map will provide stable ordering between
/// different types of iteration, at least without any addition/removal of
/// keys, you should not rely on this in practice. Even if such behavior is
/// unlikely to occur, you should expect:
///
/// * Cloned sets/iterators to have different iteration order
/// * Identical methods to have different orderings between calls
/// * A general inability to correlate orderings between different methods
///
/// If you're interested in these sorts of guarantees, you should seek
/// alternative set implementations like the `IndexSet` mentioned in the
/// corresponding [`HashTable`](crate::HashTable) docs.
///
/// # Examples
///
/// ```
Expand Down
17 changes: 17 additions & 0 deletions src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ use crate::{
/// [`HashMap`]: super::HashMap
/// [`HashSet`]: super::HashSet
/// [`Hash`]: core::hash::Hash
///
/// # Compatibility notes
///
/// While it seems likely that the table will provide stable ordering between
/// different types of iteration, at least without any mutation that affects
/// hashes or equality, you should not rely on this in practice. Even if such
/// behavior is unlikely to occur, you should expect:
///
/// * Cloned tables/iterators to have different iteration order
/// * Identical methods to have different orderings between calls
/// * A general inability to correlate orderings between different methods
///
/// If you're interested in these sorts of guarantees, you should either
/// implement your own form of `IndexMap` (as mentioned above) or use an
/// existing implementation, since this will both guarantee stability and
/// increase the speed of iteration due to not needing to handle gaps in the
/// table.
pub struct HashTable<T, A = Global>
where
A: Allocator,
Expand Down
Loading