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§
Sourcefn get_ordering_ref(&self) -> &Ordering
fn get_ordering_ref(&self) -> &Ordering
Get the ordering
Sourcefn get_current(&self) -> Self::Unit
fn get_current(&self) -> Self::Unit
Get the current value with the preset ordering