pub enum BillingError {
InvalidInput {
reason: String,
},
MonetaryOverflow {
input_value: Option<Decimal>,
},
UnsupportedEntgeltRegime {
tarifjahr: i32,
},
}Expand description
Errors returned by the billing calculation functions.
Variants§
InvalidInput
The billing input contains an invalid or inconsistent value.
Fields
MonetaryOverflow
Monetary precision overflow — the calculated amount exceeds i64 range.
This can only happen for unrealistically large billing amounts (> ~92 million EUR).
input_value carries the Decimal that caused the overflow so callers can log it.
UnsupportedEntgeltRegime
The delivery period is governed by an Entgelt regime whose methodology cannot be computed yet.
StromNEV/GasNEV and the ARegV lapse with the end of 2028; the successor
system AgNeS (GBK-25-01) is draft only — the Rahmenfestlegung is
expected end-2026, and its parameter tables follow as configuration
once they become binding. Refusing is deliberate: computing under the
lapsed Verordnung math and merely tagging the result AgNeS would be
wrong under both regimes. See
crate::regulatory::RegulatoryRegime::ensure_berechenbar.
Trait Implementations§
Source§impl Clone for BillingError
impl Clone for BillingError
Source§fn clone(&self) -> BillingError
fn clone(&self) -> BillingError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BillingError
impl Debug for BillingError
Source§impl Display for BillingError
impl Display for BillingError
Source§impl Error for BillingError
impl Error for BillingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()