pub struct Reduktionsfaktor(/* private fields */);Expand description
A §14a Modul 2 reduction factor — the fraction of the published Arbeitspreis actually paid.
Modul 2 is the prozentuale reduction; Modul 1 is the flat annual pauschale
and carries no factor at all (see ArbeitspreisModell::Modul1Pauschal).
A newtype because the range matters: "0.40" is a 60 % reduction, and a
value outside (0, 1] is not a reduction at all. The range is checked in
the constructor rather than in a validator, so a caller that reaches the
engine directly cannot multiply the tariff instead of reducing it. It
travels as a JSON string like every other Decimal — see the
architecture page’s Quantities and money on the wire.
Implementations§
Source§impl Reduktionsfaktor
impl Reduktionsfaktor
Sourcepub const REGELFALL: Self
pub const REGELFALL: Self
The statutory factor: 40 % of the Arbeitspreis, i.e. a 60 % reduction.
BNetzA BK8-22/010-A Tenor 2. b): „Der reduzierte Arbeitspreis entspricht 40% des Arbeitspreises für die Entnahme ohne Leistungsmessung des Netzbetreibers in der Niederspannung.“ Tenor 2. c) makes Modul 2 verpflichtend ab 01.01.2024, so this is the rate, not a default a Netzbetreiber may publish around — the reference price is the operator’s, the percentage is not.
Tenor 2. d) adds that no Grundpreis is levied on a Marktlokation billed under Modul 2.
Sourcepub fn new(factor: Decimal) -> Result<Self, BillingError>
pub fn new(factor: Decimal) -> Result<Self, BillingError>
Trait Implementations§
Source§impl Clone for Reduktionsfaktor
impl Clone for Reduktionsfaktor
Source§fn clone(&self) -> Reduktionsfaktor
fn clone(&self) -> Reduktionsfaktor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Reduktionsfaktor
Source§impl Debug for Reduktionsfaktor
impl Debug for Reduktionsfaktor
Source§impl<'de> Deserialize<'de> for Reduktionsfaktor
Deserialising goes through Reduktionsfaktor::new, so a factor that
arrives over the wire is range-checked exactly like one built in process.
impl<'de> Deserialize<'de> for Reduktionsfaktor
Deserialising goes through Reduktionsfaktor::new, so a factor that
arrives over the wire is range-checked exactly like one built in process.
Deriving it would have reintroduced the unconstrained Decimal this newtype
exists to prevent: a request body carrying 5 would then multiply the
Arbeitspreis by five with no error anywhere.