redgold 0.1.24

p2p database / compute engine & portfolio target models
1
2
3
4
5
6
7
8
9
10
11
12
13
use metrics::counter;
use redgold_schema::RgResult;

pub trait WithMetrics {
    fn with_err_count(self, counter: impl Into<String>) -> Self;
}

impl<T> WithMetrics for RgResult<T> {
    fn with_err_count(self, counter: impl Into<String>) -> Self {
        counter!(counter.into()).increment(1);
        self
    }
}