IsCounter

Trait IsCounter 

Source
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

Implementations on Foreign Types§

Source§

impl<C> IsCounter for &C
where C: IsCounter,

Implementors§