use crate::pos::PosCounter; pub struct IndexPosCounter { index: usize, } impl Default for IndexPosCounter { fn default() -> Self { return IndexPosCounter { index: 0 }; } } impl PosCounter for IndexPosCounter { type P = usize; fn update(&mut self, _: C) { self.index += 1; } fn export(&self) -> usize { return self.index; } }