pub struct Reduktionsfaktor(/* private fields */);Expand description
A §14a Modul 1 reduction factor — the fraction of the published rate paid.
A newtype because the range matters: 0.85 is a 15 % reduction, and a value
outside (0, 1] is not a reduction at all. The unconstrained Decimal this
replaces was range-checked in the validator and not in the engine, so a
caller who skipped validation could multiply the tariff by 5.
Implementations§
Source§impl Reduktionsfaktor
impl Reduktionsfaktor
Trait Implementations§
Source§impl Clone for Reduktionsfaktor
impl Clone for Reduktionsfaktor
Source§fn clone(&self) -> Reduktionsfaktor
fn clone(&self) -> Reduktionsfaktor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Reduktionsfaktor
Source§impl Debug for Reduktionsfaktor
impl Debug for Reduktionsfaktor
impl Eq for Reduktionsfaktor
Source§impl PartialEq for Reduktionsfaktor
impl PartialEq for Reduktionsfaktor
Source§impl Serialize for Reduktionsfaktor
impl Serialize for Reduktionsfaktor
impl StructuralPartialEq for Reduktionsfaktor
Auto Trait Implementations§
impl Freeze for Reduktionsfaktor
impl RefUnwindSafe for Reduktionsfaktor
impl Send for Reduktionsfaktor
impl Sync for Reduktionsfaktor
impl Unpin for Reduktionsfaktor
impl UnsafeUnpin for Reduktionsfaktor
impl UnwindSafe for Reduktionsfaktor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more