2 unstable releases

Uses old Rust 2015

0.2.0 Oct 22, 2017
0.1.1 Oct 22, 2017

#122 in #counter

Download history 160/week @ 2023-12-13 92/week @ 2023-12-20 62/week @ 2023-12-27 151/week @ 2024-01-03 180/week @ 2024-01-10 176/week @ 2024-01-17 78/week @ 2024-01-24 211/week @ 2024-01-31 215/week @ 2024-02-07 141/week @ 2024-02-14 145/week @ 2024-02-21 127/week @ 2024-02-28 207/week @ 2024-03-06 182/week @ 2024-03-13 193/week @ 2024-03-20 67/week @ 2024-03-27

675 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

~245KB