Skip to main content

IsoMessage

Trait IsoMessage 

Source
pub trait IsoMessage: Validatable {
    // Required methods
    fn message_type(&self) -> &'static str;
    fn root_path(&self) -> &'static str;

    // Provided method
    fn validate_message(&self) -> Vec<ConstraintViolation> { ... }
}
Expand description

Marker trait for document-level types that represent a complete ISO 20022 message.

Only top-level Document structs implement this trait. It provides the message type identifier and root XPath used as the base path for constraint validation.

Required Methods§

Source

fn message_type(&self) -> &'static str

The ISO 20022 message type identifier (e.g. "pacs.008.001.13").

Source

fn root_path(&self) -> &'static str

The root XML element path (e.g. "/Document").

Provided Methods§

Source

fn validate_message(&self) -> Vec<ConstraintViolation>

Validate all XSD constraints starting from the root path.

Convenience method that calls Validatable::validate_constraints with the correct root path.

Implementors§

Source§

impl IsoMessage for mx20022_model::generated::pacs::pacs_002_001_14::Document

Source§

impl IsoMessage for mx20022_model::generated::pacs::pacs_004_001_11::Document

Source§

impl IsoMessage for mx20022_model::generated::pacs::pacs_008_001_13::Document

Source§

impl IsoMessage for mx20022_model::generated::pacs::pacs_009_001_10::Document

Source§

impl IsoMessage for mx20022_model::generated::pacs::pacs_028_001_05::Document