pub trait Validatable {
// Required method
fn validate_constraints(
&self,
path: &str,
violations: &mut Vec<ConstraintViolation>,
);
}Expand description
Types that can self-validate against their XSD-level constraints.
Implementations are auto-generated by mx20022-codegen. Each type checks
its own constraints and recurses into nested types, accumulating all
violations into the provided Vec.
The path parameter is the XPath prefix for error reporting. Recursive
calls append the current field’s XML name to build a full path like
"/Document/FIToFICstmrCdtTrf/GrpHdr/MsgId".
Required Methods§
Sourcefn validate_constraints(
&self,
path: &str,
violations: &mut Vec<ConstraintViolation>,
)
fn validate_constraints( &self, path: &str, violations: &mut Vec<ConstraintViolation>, )
Validate XSD constraints on this value and all nested children.
path is the XPath-like location of this value in the message tree.
Violations are appended to violations.
Implementations on Foreign Types§
Source§impl Validatable for bool
No-op Validatable for bool.
impl Validatable for bool
No-op Validatable for bool.
fn validate_constraints( &self, _path: &str, _violations: &mut Vec<ConstraintViolation>, )
Source§impl Validatable for String
No-op Validatable for String (no XSD constraints on bare strings).
impl Validatable for String
No-op Validatable for String (no XSD constraints on bare strings).