winterbaume-pricing 0.2.0

AWS Pricing service implementation for winterbaume
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::collections::HashMap;

#[derive(Debug, Default)]
pub struct PricingState {
    /// Number of calls made per operation, for observability.
    pub call_counts: HashMap<String, u64>,
}

impl PricingState {
    pub fn record_call(&mut self, op: &str) {
        *self.call_counts.entry(op.to_string()).or_default() += 1;
    }
}