pub(super) trait WorkCounter: WorkCounterClone + Debug + Send {
    // Required methods
    fn start(&mut self);
    fn stop(&mut self);
    fn name(&self) -> String;
    fn get_base(&self) -> &WorkCounterBase;
}
Expand description

An abstraction of work counters

Use for trait objects, as we have might have types of work counters for the same work packet and the types are not statically known. The overhead should be negligible compared with the cost of executing a work packet.

Required Methods§

source

fn start(&mut self)

Start the counter

source

fn stop(&mut self)

Stop the counter

source

fn name(&self) -> String

Name of counter

source

fn get_base(&self) -> &WorkCounterBase

Return a reference to WorkCounterBase

Trait Implementations§

source§

impl Clone for Box<dyn WorkCounter>

source§

fn clone(&self) -> Box<dyn WorkCounter>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§