counter 0.7.1

Simple package to count generic iterables
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Counter;

use std::collections::HashMap;
use std::ops::{Deref, DerefMut};

impl<T, N, S> Deref for Counter<T, N, S> {
    type Target = HashMap<T, N, S>;
    fn deref(&self) -> &HashMap<T, N, S> {
        &self.map
    }
}

impl<T, N, S> DerefMut for Counter<T, N, S> {
    fn deref_mut(&mut self) -> &mut HashMap<T, N, S> {
        &mut self.map
    }
}