#key #map #counter #hash-map #value #time #incremented

countmap

Simple map to count occurences of supplied keys

2 unstable releases

Uses old Rust 2015

0.2.0 Oct 22, 2017
0.1.1 Oct 22, 2017

#124 in #counter

Download history 151/week @ 2024-06-09 176/week @ 2024-06-16 108/week @ 2024-06-23 41/week @ 2024-06-30 40/week @ 2024-07-07 37/week @ 2024-07-14 33/week @ 2024-07-21 34/week @ 2024-07-28 24/week @ 2024-08-04 19/week @ 2024-08-11 15/week @ 2024-08-18 10/week @ 2024-08-25 43/week @ 2024-09-01 142/week @ 2024-09-08 59/week @ 2024-09-15 150/week @ 2024-09-22

396 downloads per month

MIT/Apache

23KB
271 lines

CountMap

Travis Build Status License License

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.

Documentation

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:

Dependencies

~240KB