Skip to main content

CounterCollection

Trait CounterCollection 

Source
pub trait CounterCollection:
    Debug
    + Default
    + TestOnlyPartialEq {
    type Spec: CounterCollectionSpec<CounterCollection<Self::Repr> = Self>;
    type Repr: CounterRepr;

    // Provided method
    fn cast<C: CounterRepr>(
        &self,
    ) -> <Self::Spec as CounterCollectionSpec>::CounterCollection<C> { ... }
}
Expand description

A collection of counters.

Required Associated Types§

Source

type Spec: CounterCollectionSpec<CounterCollection<Self::Repr> = Self>

The CounterCollectionSpec associated with this collection.

Source

type Repr: CounterRepr

The counter representation held by this collection.

Provided Methods§

Source

fn cast<C: CounterRepr>( &self, ) -> <Self::Spec as CounterCollectionSpec>::CounterCollection<C>

A utility method to cast this collection of counters into a different underlying counter representation.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§