[−][src]Type Definition bevy_utils::HashMap
type HashMap<K, V> = HashMap<K, V, RandomState>;
A std hash map implementing AHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.
AHash is designed for performance and is NOT cryptographically secure.
Trait Implementations
impl<K, V> AHashExt for HashMap<K, V>
[src]
pub fn new() -> Self
[src]
Creates an empty HashMap
with AHash.
The hash map is initially created with a capacity of 0, so it will not allocate until it is first inserted into.
Examples
use bevy_utils::{HashMap, AHashExt}; let mut map: HashMap<&str, i32> = HashMap::new();
pub fn with_capacity(capacity: usize) -> Self
[src]
Creates an empty HashMap
with the specified capacity with AHash.
The hash map will be able to hold at least capacity
elements without
reallocating. If capacity
is 0, the hash map will not allocate.
Examples
use bevy_utils::{HashMap, AHashExt}; let mut map: HashMap<&str, i32> = HashMap::with_capacity(10);