lcov_parser/report/summary.rs
1// Copyright (c) 2015-2016 lcov-parser developers
2//
3// Licensed under the Apache License, Version 2.0
4// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT
5// license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. All files in the project carrying such notice may not be copied,
7// modified, or distributed except according to those terms.
8
9use std::collections::btree_map:: { Iter };
10
11pub trait Summary<K, V> {
12 fn iter(&self) -> Iter<K, V>;
13 fn contains_key(&self, k: &K) -> bool;
14 fn get(&self, key: &K) -> Option<&V>;
15 fn len(&self) -> usize;
16 fn is_empty(&self) -> bool {
17 self.len() <= 0
18 }
19}