README.md
1[![Travis Build Status](https://travis-ci.org/havarnov/multimap.svg?branch=master)](https://travis-ci.org/havarnov/multimap)
2[![crates.io](http://meritbadge.herokuapp.com/multimap)](https://crates.io/crates/multimap)
3[![docs.rs](https://docs.rs/multimap/badge.svg)](https://docs.rs/multimap/)
4
5# Multimap implementation for Rust
6
7This is a multimap implementation for Rust. Implemented as a thin wrapper around
8std::collections::HashMap.
9
10## Example
11
12````rust
13extern crate multimap;
14
15use multimap::MultiMap;
16
17fn main () {
18 let mut map = MultiMap::new();
19
20 map.insert("key1", 42);
21 map.insert("key1", 1337);
22 map.insert("key2", 2332);
23
24 assert_eq!(map["key1"], 42);
25 assert_eq!(map.get("key1"), Some(&42));
26 assert_eq!(map.get_vec("key1"), Some(&vec![42, 1337]));
27}
28````
29
30## Changelog
31
32### 0.7.0
33
34* Added possibility to replace the default hasher for the underlying ```HashMap```.
35* Fix build warning by removing an unnecessary ```mut```.
36
37### 0.8.0
38
39* Added MultiMap::insert_many
40* Added MultiMap::insert_many_from_slice
41
42## License
43
44Licensed under either of
45 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
46 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
47at your option.
48
49### Contribution
50
51Unless you explicitly state otherwise, any contribution intentionally submitted
52for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
53additional terms or conditions.
54