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

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

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

Required methods

fn stat_list(&self) -> &[StatDefinitionTagged][src]

The list of stats that this trigger applies to.

fn tag_value(
    &self,
    stat_id: &StatDefinitionTagged,
    _tag_name: &'static str
) -> String
[src]

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

Loading content...

Provided methods

fn condition(&self, _stat_id: &StatDefinitionTagged) -> bool[src]

The condition that must be satisfied for this stat to change

fn change(&self, _stat_id: &StatDefinitionTagged) -> Option<ChangeType>[src]

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

fn bucket_value(&self, _stat_id: &StatDefinitionTagged) -> Option<f64>[src]

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

Loading content...

Implementors

Loading content...