Skip to main content

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Implementors§