Trait slog_extlog::stats::StatTrigger[][src]

pub trait StatTrigger {
    fn stat_list(&self) -> &'static [&'static (StatDefinition + Sync)];
fn tag_value(
        &self,
        stat_id: &StatDefinition,
        _tag_name: &'static str
    ) -> String; fn condition(&self, _stat_id: &StatDefinition) -> bool { ... }
fn change(&self, _stat_id: &StatDefinition) -> Option<ChangeType> { ... }
fn bucket_value(&self, _stat_id: &StatDefinition) -> Option<f64> { ... } }

A trait indicating that this statistic can be used to trigger a statistics change.

Required Methods

Important traits for &'a [u8]

The list of stats that this trigger applies to.

Get the associated tag value for this log. The value must be convertable to a string so it can be stored internally.

Provided Methods

The condition that must be satisfied for this stat to change

The details of the change to make for this stat, if condition returned true.

The value to be used to sort the statistic into the correct bucket(s).

Implementors