ocpi-tariffs 0.45.0

OCPI tariff calculations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rust_decimal::Decimal;
use rust_decimal_macros::dec;

use crate::test::ApproxEq;

impl ApproxEq for Decimal {
    type Tolerance = Decimal;

    fn default_tolerance() -> Self::Tolerance {
        dec!(0.1)
    }

    fn approx_eq_tolerance(&self, other: &Self, tolerance: Self::Tolerance) -> bool {
        super::approx_eq_dec(self, other, tolerance)
    }
}