Expand description
§Field-Specific Utility Functions
Higher-level parsing utilities specific to SWIFT MT message fields. These utilities handle complex field patterns like party identifiers, multiline text, and field-specific validation logic.
Enums§
- Bank
Operation Code - Bank operation codes used in Field 23 and similar fields
- Payment
Method Code - Payment method codes used in Field 57 and similar fields
- Transaction
Type Code - Transaction type codes used in Field 61 and similar fields
Functions§
- extract_
field_ number - Extract the numeric part from mixed alphanumeric field (e.g., “32A” -> “32”)
- extract_
field_ option - Extract field option (e.g., “A” from “:50A:”)
- is_
numbered_ line - Check if a line looks like a numbered field line (e.g., “1/” or “2/” at start)
- parse_
debit_ credit_ mark - Parse and validate debit/credit mark (D or C)
- parse_
field_ tag - Parse a field tag with optional variant (e.g., “50A” -> (“50”, Some(‘A’)))
- parse_
field_ with_ suffix - Parse field with optional suffix (e.g., “20C” -> (“20”, Some(‘C’)))
- parse_
multiline_ text - Parse multiline text (4*35x format) - simpler version for basic multiline fields
- parse_
name_ and_ address - Parse name and address lines (4*35x format) Used in fields 50-59 for party name and address information
- parse_
numbered_ lines - Parse numbered lines format (e.g., “1/ACCOUNT”, “2/NAME”)
- parse_
party_ identifier - Parse party identifier in format /1!a/34x, /2!a/34x, //XX, or /34x Used in fields 51-59 for institutional and party identification
- parse_
payment_ method - Parse payment method from //XX format
- validate_
field_ option - Validate that a field option (like 50A, 50K) matches expected options
- validate_
multiline_ text - Validate multi-line text with specific constraints
Returns validated lines as Vec