1 A library to quickly get the live/total/max counts of allocated instances.
6 _c: countme::Count<Self>,
10 let w1 = Widget::default();
11 let w2 = Widget::default();
12 let w3 = Widget::default();
15 let counts = countme::get::<Widget>();
16 assert_eq!(counts.live, 2);
17 assert_eq!(counts.max_live, 3);
18 assert_eq!(counts.total, 3);
20 eprintln!("{}", countme::get_all());