Rust solution
\nimpl Solution {\n    pub fn digit_count(num: String) -> bool {\n        let mut counter = [0; 10];\n        let num_it = num.bytes().map(|b| (b - b\'0\') as u
```\nimpl Solution {\n    pub fn digit_count(num: String) -> bool {\n        let mut counter = [0; 10];\n        let num_it = num.bytes().map(|b| (b - b\'0\') as usize);\n        num_it.clone().for_each(|idx| counter[idx] += 1);\n        num_it.enumerate().all(|(i, idx)| counter[i] == idx)\n    }\n}\n```
['Rust']