pub struct ValidationResult {
pub is_valid: bool,
pub warnings: Vec<SettlementWarning>,
}Expand description
Result of pre-calculation input validation.
For NNE there is no separate validator: the invariants that mattered are
either unrepresentable — an inverted SettlementPeriod, a half-set
Leistungspreis, two §14a modules at once — or enforced inside
crate::settle_nne itself. A validator the engine did not call was how a
caller who skipped it got billed on the wrong basis with no error.
validate_mmm_input, validate_msb_input and validate_gas_awh_input
remain for inputs whose engines accept looser shapes.
Fields§
§is_valid: boolWhether the input passed all validation checks.
warnings: Vec<SettlementWarning>All warnings and errors found. May contain WarningSeverity::Info items
even when is_valid = true.
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn push(&mut self, w: SettlementWarning)
pub fn push(&mut self, w: SettlementWarning)
Appends a warning. WarningSeverity::Error marks the result invalid.
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
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 moreAuto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin for ValidationResult
impl UnsafeUnpin for ValidationResult
impl UnwindSafe for ValidationResult
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