ServiceStats

pub trait ServiceStats:
    Clone
    + Debug
    + Send
    + Sync
    + Default
    + 'static {
    // Required methods
    fn reset(&mut self);
    fn merge(&mut self, other: &Self);
    fn summary(&self) -> HashMap<String, String>;
}
Expand description

Generic trait for service statistics collection

Required Methods§

Source

fn reset(&mut self)

Resets all statistics to their initial state

Source

fn merge(&mut self, other: &Self)

Merges statistics from another instance

Source

fn summary(&self) -> HashMap<String, String>

Returns a summary of key metrics as key-value pairs

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§