pub struct Counters<T> {
pub list: BTreeMap<T, Counter>,
}Fields§
§list: BTreeMap<T, Counter>Implementations§
Source§impl<T> Counters<T>where
T: Ord,
impl<T> Counters<T>where
T: Ord,
Sourcepub fn inc_counter(&mut self, id: T)
pub fn inc_counter(&mut self, id: T)
increment counter
Sourcepub fn set_counter(&mut self, id: T, val: u32)
pub fn set_counter(&mut self, id: T, val: u32)
increment counter
Sourcepub fn header_fmt(&self) -> String
pub fn header_fmt(&self) -> String
counter heders in string format (center justified, min 10 spaces)
Sourcepub fn values_fmt(&self) -> String
pub fn values_fmt(&self) -> String
format values in string format (center justified to column header - min 10 spaces)
Trait Implementations§
impl<T> StructuralPartialEq for Counters<T>
Auto Trait Implementations§
impl<T> Freeze for Counters<T>
impl<T> RefUnwindSafe for Counters<T>where
T: RefUnwindSafe,
impl<T> Send for Counters<T>where
T: Send,
impl<T> Sync for Counters<T>where
T: Sync,
impl<T> Unpin for Counters<T>
impl<T> UnwindSafe for Counters<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more