Crate countmap [] [src]

A map that helps counting elements.



A count map is a hash map where the value field is a constantly incremented counter. If a key is inserted for the first time, the counter is set to 1. Every subsequent insert will increment the counter by 1. This implementation just acts as a decorator around a HashMap and exposes almost the complete API of HashMap except things like iter_mut() or get_mut() since it doesn't make sense in this use case.