countmap

Crates.iocountmap
lib.rscountmap
version0.2.0
sourcesrc
created_at2017-10-22 12:17:03.635143
updated_at2017-10-22 16:42:17.360433
descriptionSimple map to count occurences of supplied keys
homepagehttps://github.com/vbrandl/countmap
repositoryhttps://github.com/vbrandl/countmap
max_upload_size
id36556
size35,323
owners (github:sagan-software:owners)

documentation

https://docs.rs/countmap

README

CountMap

Travis Build Status License License crates.io

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:

Commit count: 26

cargo fmt