Trait metrics_util::Generational[][src]

pub trait Generational<H>: From<H> {
    fn increment_generation(&self);
fn get_generation(&self) -> Generation;
fn get_inner(&self) -> &H; fn initial(inner: H) -> Self { ... } }
Expand description

A trait that defines generational semantics for wrapper types.

Used to provide compile-time generation tracking where the choice is encoded in which type is used (i.e. Tracked vs NotTracked), which necessitates a trait to mediate usage.

Required methods

Increments the generation counter.

Gets the current generation counter.

Gets a reference to the inner type.

Provided methods

Creates a default initialized wrapper around inner.

Implementors