pub trait IsCounter: HasCountingBehavior + CountsNonmotonically {
    type Unit: Sized + PartialEq + PartialOrd + Clone + Debug + Copy + Hash;

    // Required methods
    fn get_ordering_ref(&self) -> &Ordering;
    fn get_current(&self) -> Self::Unit;
}
Expand description

Something that is a counter

Required Associated Types§

Required Methods§

source

fn get_ordering_ref(&self) -> &Ordering

Get the ordering

source

fn get_current(&self) -> Self::Unit

Get the current value with the preset ordering

Implementors§