Skip to main content

eeg_billing/
error.rs

1//! Error type for `eeg-billing`.
2
3use thiserror::Error;
4
5/// Errors that can be returned by `eeg-billing` functions.
6#[derive(Debug, Error)]
7pub enum SettlementError {
8    /// Settlement amount exceeded the representable range (> ±92 233 720 368 EUR).
9    ///
10    /// This is impossible in practice for any real EEG/KWKG plant.
11    #[error("settlement amount out of representable range: {0}")]
12    AmountOutOfRange(rust_decimal::Decimal),
13}