impl_validated_arithmetic

Macro impl_validated_arithmetic 

Source
macro_rules! impl_validated_arithmetic {
    ($StructName:ident, $PolicyType:ident) => { ... };
}
Expand description

Implements arithmetic traits: Add, Sub, Mul, Div and their *Assign variants.

Generates all 6 implementations per operation (4 binary + 2 assignment).

§Example

impl_validated_arithmetic!(MyType, RealPolicy);