SequenceCountProviderCore

Trait SequenceCountProviderCore 

Source
pub trait SequenceCountProviderCore<Raw> {
    // Required methods
    fn get(&self) -> Raw;
    fn increment(&self);

    // Provided method
    fn get_and_increment(&self) -> Raw { ... }
}
Expand description

Core trait for objects which can provide a sequence count.

The core functions are not mutable on purpose to allow easier usage with static structs when using the interior mutability pattern. This can be achieved by using Cell, core::cell::RefCell or atomic types.

Required Methods§

Source

fn get(&self) -> Raw

Source

fn increment(&self)

Provided Methods§

Source

fn get_and_increment(&self) -> Raw

Implementors§