10 releases (breaking)

Uses old Rust 2015

0.8.2 Aug 26, 2020
0.8.1 Mar 29, 2020
0.8.0 Nov 21, 2019
0.5.0 May 15, 2019
0.1.0 Apr 24, 2015
Download history 47426/week @ 2020-11-09 53317/week @ 2020-11-16 43098/week @ 2020-11-23 52821/week @ 2020-11-30 54714/week @ 2020-12-07 54618/week @ 2020-12-14 34292/week @ 2020-12-21 30969/week @ 2020-12-28 56393/week @ 2021-01-04 63031/week @ 2021-01-11 63777/week @ 2021-01-18 66770/week @ 2021-01-25 70494/week @ 2021-02-01 75631/week @ 2021-02-08 77828/week @ 2021-02-15 78673/week @ 2021-02-22

167,032 downloads per month
Used in 426 crates (30 directly)

MIT/Apache

47KB
924 lines

Travis Build Status crates.io docs.rs

Multimap implementation for Rust

This is a multimap implementation for Rust. Implemented as a thin wrapper around std::collections::HashMap.

Example

extern crate multimap;

use multimap::MultiMap;

fn main () {
    let mut map = MultiMap::new();

    map.insert("key1", 42);
    map.insert("key1", 1337);
    map.insert("key2", 2332);

    assert_eq!(map["key1"], 42);
    assert_eq!(map.get("key1"), Some(&42));
    assert_eq!(map.get_vec("key1"), Some(&vec![42, 1337]));
}

Changelog

0.8.2

  • Added #![forbid(unsafe_code)].

0.8.1

  • Fixed wrong link to documentation in Crago.toml.

0.8.0

  • Added MultiMap::insert_many
  • Added MultiMap::insert_many_from_slice

0.7.0

  • Added possibility to replace the default hasher for the underlying HashMap.
  • Fix build warning by removing an unnecessary mut.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~68KB