pub struct Field52D {
pub name_and_address: Vec<String>,
}
Expand description
§Field 52D: Ordering Institution (Option D)
§Overview
Field 52D identifies the ordering institution in SWIFT payment messages using name and address information rather than a BIC code. This option is used when the ordering institution does not have a BIC or when full name and address details are required for regulatory, compliance, or routing purposes.
§Format Specification
Format: 4*35x
- 4*35x: Up to 4 lines of name and address information
- Line length: Maximum 35 characters per line
- Character set: SWIFT character set (printable ASCII)
- Content: Institution name, street address, city, country
§Structure
Line 1: Institution Name
Line 2: Street Address
Line 3: City, State/Province, Postal Code
Line 4: Country (optional)
§Usage Context
Field 52D is used in:
- MT103: Single Customer Credit Transfer (when 52A not available)
- MT200: Financial Institution Transfer
- MT202: General Financial Institution Transfer
- MT202COV: Cover for customer credit transfer
§Business Applications
- Non-SWIFT institutions: Identifying institutions without BIC codes
- Regulatory compliance: Providing full address for compliance requirements
- Local banks: Identifying smaller banks or credit unions
- Correspondent banking: When full address details are required
- Sanctions screening: Enabling comprehensive name/address screening
§Examples
:52D:FIRST NATIONAL BANK
123 MAIN STREET
ANYTOWN NY 12345
UNITED STATES
└─── US regional bank with full address
:52D:BANQUE REGIONALE SARL
45 RUE DE LA PAIX
PARIS 75001 FRANCE
└─── French regional bank (3 lines)
:52D:CREDIT UNION COOPERATIVE
789 COMMUNITY DRIVE
SMALLTOWN CA 90210
└─── Credit union (minimal address)
§Address Format Guidelines
- Line 1: Institution legal name (required)
- Line 2: Street address/building number (recommended)
- Line 3: City, state/province, postal code (recommended)
- Line 4: Country name (optional but recommended for international)
§Address Standards
- Use standard postal abbreviations
- Include postal/ZIP codes when available
- Spell out country names in full
- Avoid special characters and diacritical marks
- Use standard address formatting conventions
§Validation Rules
- Minimum content: At least 1 line required
- Maximum lines: No more than 4 lines
- Line length: Each line maximum 35 characters
- Character validation: Only printable ASCII characters
- Content requirement: Must contain meaningful institution information
§Network Validated Rules (SWIFT Standards)
- Minimum 1 line, maximum 4 lines allowed (Error: C54)
- Each line cannot exceed 35 characters (Error: T14)
- Characters must be from SWIFT character set (Error: T61)
- Lines cannot be empty (Error: T11)
- Must contain institution name in first line (Error: C55)
- Field 52D alternative to 52A (Error: C52)
Fields§
§name_and_address: Vec<String>
Name and address lines (up to 4 lines of 35 characters each)
Implementations§
Source§impl Field52D
impl Field52D
Sourcepub fn new(name_and_address: Vec<String>) -> Result<Self, ParseError>
pub fn new(name_and_address: Vec<String>) -> Result<Self, ParseError>
Create a new Field52D with validation
Sourcepub fn from_string(content: impl Into<String>) -> Result<Self, ParseError>
pub fn from_string(content: impl Into<String>) -> Result<Self, ParseError>
Create from a single string, splitting on newlines
Sourcepub fn name_and_address(&self) -> &[String]
pub fn name_and_address(&self) -> &[String]
Get the name and address lines
Sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Get the number of lines
Sourcepub fn add_line(&mut self, line: String) -> Result<(), ParseError>
pub fn add_line(&mut self, line: String) -> Result<(), ParseError>
Add a line of name/address information
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get human-readable description
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field52D
impl<'de> Deserialize<'de> for Field52D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl SwiftField for Field52D
impl SwiftField for Field52D
Source§fn to_swift_string(&self) -> String
fn to_swift_string(&self) -> String
Convert field back to SWIFT string format
Source§fn validate(&self) -> ValidationResult
fn validate(&self) -> ValidationResult
Validate field according to SWIFT format rules
Source§fn format_spec() -> &'static str
fn format_spec() -> &'static str
Get field format specification
impl Eq for Field52D
impl StructuralPartialEq for Field52D
Auto Trait Implementations§
impl Freeze for Field52D
impl RefUnwindSafe for Field52D
impl Send for Field52D
impl Sync for Field52D
impl Unpin for Field52D
impl UnwindSafe for Field52D
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