2 unstable releases
Uses old Rust 2015
0.2.0 | Oct 22, 2017 |
---|---|
0.1.1 | Oct 22, 2017 |
#124 in #counter
396 downloads per month
23KB
271 lines
CountMap
Implementation of a count map in Rust. A map that holds a counter as a value, that gets incremented each time the key is added to the map. This implementation simply decorates the HashMap from the Rust std library.
Usage
Add the following to your Cargo.toml
:
[dependencies]
countmap = "0.1"
Next, add this to your crate root:
extern crate countmap;
Now you can use a count map in your code:
fn main() {
let map = countmap::CountMap::new();
map.insert_or_increment("foo");
}
License
Countmap is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
Dependencies
~240KB