Struct Field23E

Source
pub struct Field23E {
    pub instruction_code: String,
    pub additional_info: Option<String>,
}
Expand description

§Field 23E: Instruction Code

§Overview

Field 23E contains instruction codes that specify how the transaction should be processed by the receiving financial institution. These codes provide additional processing instructions beyond the basic operation code in Field 23B, enabling more granular control over payment handling, timing, and communication requirements.

§Format Specification

Format: 4!c[/30x]

  • 4!c: Exactly 4 alphanumeric characters (instruction code)
  • [/30x]: Optional additional information (up to 30 characters after slash)
  • Character set: A-Z, 0-9 for instruction code; printable ASCII for additional info
  • Case handling: Instruction codes normalized to uppercase
  • Validation: Must use recognized instruction codes

§Standard Instruction Codes

The SWIFT-recognized instruction codes and their meanings:

§Payment Method Instructions

  • CHQB: Pay by cheque/banker’s draft - Physical payment instrument required
  • REPA: Reimbursement payment - Payment for reimbursement purposes

§Communication Instructions

  • PHOB: Phone ordering customer before payment - Contact beneficiary before processing
  • PHOI: Phone intermediary bank before payment - Contact intermediary institution
  • PHON: Phone all parties before payment - Contact all relevant parties
  • TELB: Telex beneficiary before payment - Send telex to beneficiary
  • TELE: Telex all parties before payment - Send telex to all parties
  • TELI: Telex intermediary bank before payment - Send telex to intermediary

§Processing Instructions

  • HOLD: Hold payment until further notice - Suspend processing pending instructions
  • INTC: Intracompany payment - Internal company transfer
  • SDVA: Same day value - Ensure same-day value dating

§Usage Context

Field 23E is used in conjunction with Field 23B in various MT message types:

  • MT103: Single Customer Credit Transfer
  • MT202: General Financial Institution Transfer
  • MT202COV: Cover for customer credit transfer
  • MT205: Financial Institution Transfer for its Own Account

§Business Applications

  • Payment timing: Control when payments are processed (SDVA, HOLD)
  • Communication protocols: Specify required notifications (PHOB, TELB, etc.)
  • Payment methods: Indicate specific payment instruments (CHQB)
  • Risk management: Enable additional verification steps (PHON, HOLD)
  • Compliance: Support regulatory and internal control requirements
  • Customer service: Ensure proper communication with beneficiaries

§Business Rules and Restrictions

Field 23E usage is restricted based on the operation code in Field 23B:

§Field 23B = SPRI (Special Priority)

Only the following 23E codes are permitted:

  • SDVA: Same day value
  • TELB: Telex beneficiary before payment
  • PHOB: Phone ordering customer before payment
  • INTC: Intracompany payment

§Field 23B = SSTD or SPAY

Field 23E must not be present when 23B contains these codes.

§Other 23B Values

Any valid instruction code may be used with other operation codes.

§Validation Rules

  1. Instruction code: Must be exactly 4 alphanumeric characters
  2. Valid codes: Must be from the recognized instruction code list
  3. Additional info: Optional, max 30 characters if present
  4. Character set: Printable ASCII characters only
  5. Business rules: Must comply with Field 23B restrictions
  6. Format: Additional info must follow slash separator

§Network Validated Rules (SWIFT Standards)

  • Instruction code must be exactly 4 characters (Error: T26)
  • Must be a recognized instruction code (Error: T18)
  • Additional information max 30 characters (Error: T13)
  • Must comply with Field 23B business rules (Error: T40)
  • Character set validation (Error: T61)

§Examples

:23E:CHQB
└─── Pay by cheque/banker's draft

:23E:HOLD/COMPLIANCE CHECK
└─── Hold payment with additional information

:23E:PHOB/CALL BEFORE 5PM
└─── Phone beneficiary with specific timing

:23E:SDVA
└─── Same day value dating required

Fields§

§instruction_code: String

Instruction code (exactly 4 alphanumeric characters)

Specifies the processing instruction for the transaction. Must be one of the recognized SWIFT instruction codes.

Format: Exactly 4 alphanumeric characters (A-Z, 0-9) Case handling: Automatically normalized to uppercase Validation: Must be from the standard instruction code list

§Standard Codes

  • "CHQB" - Pay by cheque/banker’s draft
  • "HOLD" - Hold payment until further notice
  • "INTC" - Intracompany payment
  • "PHOB" - Phone ordering customer before payment
  • "PHOI" - Phone intermediary bank before payment
  • "PHON" - Phone all parties before payment
  • "REPA" - Reimbursement payment
  • "SDVA" - Same day value
  • "TELB" - Telex beneficiary before payment
  • "TELE" - Telex all parties before payment
  • "TELI" - Telex intermediary bank before payment
§additional_info: Option<String>

Additional information (optional, up to 30 characters)

Provides supplementary details about the instruction code. This field is optional and should only be used when additional clarification or specific details are required.

Format: Up to 30 printable ASCII characters Separator: Must be preceded by “/” in SWIFT format Validation: Cannot be empty if specified

§Examples

  • "COMPLIANCE CHECK" - For HOLD instructions
  • "CALL BEFORE 5PM" - For phone instructions
  • "WEEKLY PAYMENT" - For REPA instructions
  • "URGENT PROCESSING" - For time-sensitive instructions

Implementations§

Source§

impl Field23E

Source

pub fn new( instruction_code: impl Into<String>, additional_info: Option<String>, ) -> Result<Self>

Create a new Field23E with validation

Source

pub fn code(&self) -> &str

Get the instruction code

Returns the 4-character instruction code that specifies how the transaction should be processed.

§Returns

A string slice containing the instruction code in uppercase

§Example
let field = Field23E::new("CHQB", None).unwrap();
assert_eq!(field.code(), "CHQB");
Source

pub fn additional_info(&self) -> Option<&str>

Get the additional information

Returns the optional additional information that provides supplementary details about the instruction.

§Returns

An optional string slice containing the additional information

§Example
let field = Field23E::new("HOLD", Some("COMPLIANCE CHECK".to_string())).unwrap();
assert_eq!(field.additional_info(), Some("COMPLIANCE CHECK"));
Source

pub fn is_valid_code(&self) -> bool

Check if this is a valid instruction code

Determines if the instruction code is recognized by SWIFT standards.

§Returns

true if the instruction code is valid

§Example
let field = Field23E::new("CHQB", None).unwrap();
assert!(field.is_valid_code());
Source

pub fn is_communication_instruction(&self) -> bool

Check if this is a communication instruction

Determines if the instruction code requires communication with parties before processing the payment.

§Returns

true if the instruction requires communication

§Example
let phone_instruction = Field23E::new("PHOB", None).unwrap();
assert!(phone_instruction.is_communication_instruction());

let payment_instruction = Field23E::new("CHQB", None).unwrap();
assert!(!payment_instruction.is_communication_instruction());
Source

pub fn is_timing_instruction(&self) -> bool

Check if this is a timing instruction

Determines if the instruction code affects the timing or scheduling of the payment processing.

§Returns

true if the instruction affects timing

§Example
let timing_instruction = Field23E::new("SDVA", None).unwrap();
assert!(timing_instruction.is_timing_instruction());

let hold_instruction = Field23E::new("HOLD", None).unwrap();
assert!(hold_instruction.is_timing_instruction());
Source

pub fn is_payment_method_instruction(&self) -> bool

Check if this is a payment method instruction

Determines if the instruction code specifies a particular payment method or instrument.

§Returns

true if the instruction specifies a payment method

§Example
let method_instruction = Field23E::new("CHQB", None).unwrap();
assert!(method_instruction.is_payment_method_instruction());

let reimbursement = Field23E::new("REPA", None).unwrap();
assert!(reimbursement.is_payment_method_instruction());
Source

pub fn requires_manual_intervention(&self) -> bool

Check if this instruction requires manual intervention

Determines if the instruction code typically requires manual processing or intervention by bank staff.

§Returns

true if manual intervention is likely required

§Example
let manual_instruction = Field23E::new("HOLD", None).unwrap();
assert!(manual_instruction.requires_manual_intervention());

let auto_instruction = Field23E::new("SDVA", None).unwrap();
assert!(!auto_instruction.requires_manual_intervention());
Source

pub fn priority_impact(&self) -> i8

Get the processing priority impact

Returns how this instruction affects processing priority. Positive values increase priority, negative values decrease it.

§Returns

Priority adjustment (-2 to +2)

§Example
let urgent = Field23E::new("SDVA", None).unwrap();
assert_eq!(urgent.priority_impact(), 2);

let hold = Field23E::new("HOLD", None).unwrap();
assert_eq!(hold.priority_impact(), -2);
Source

pub fn description(&self) -> &'static str

Get human-readable description of the instruction code

Returns a descriptive string explaining what this instruction code represents and its typical usage in payment processing.

§Returns

A descriptive string

§Example
let field = Field23E::new("CHQB", None).unwrap();
println!("{}", field.description());
Source

pub fn instruction_category(&self) -> &'static str

Get the instruction category

Returns the category that this instruction code belongs to, helping to group related instructions.

§Returns

Instruction category as a string

§Example
let field = Field23E::new("PHOB", None).unwrap();
assert_eq!(field.instruction_category(), "Communication");
Source

pub fn recommends_additional_info(&self) -> bool

Check if additional information is recommended

Determines if this instruction code typically benefits from additional information to clarify processing requirements.

§Returns

true if additional information is recommended

§Example
let hold = Field23E::new("HOLD", None).unwrap();
assert!(hold.recommends_additional_info());

let same_day = Field23E::new("SDVA", None).unwrap();
assert!(!same_day.recommends_additional_info());
Source

pub fn validate_with_field_23b(&self, field_23b_code: &str) -> Result<()>

Validate against Field 23B business rules

Source

pub fn comprehensive_description(&self) -> String

Get comprehensive instruction details

Returns a detailed description including the instruction code, category, description, and additional information if present.

§Returns

Formatted string with comprehensive details

§Example
let field = Field23E::new("HOLD", Some("COMPLIANCE CHECK".to_string())).unwrap();
println!("{}", field.comprehensive_description());

Trait Implementations§

Source§

impl Clone for Field23E

Source§

fn clone(&self) -> Field23E

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Field23E

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Field23E

Source§

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 Display for Field23E

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Field23E

Source§

fn eq(&self, other: &Field23E) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Field23E

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SwiftField for Field23E

Source§

fn parse(value: &str) -> Result<Self, ParseError>

Parse field value from string representation
Source§

fn to_swift_string(&self) -> String

Convert field back to SWIFT string format
Source§

fn validate(&self) -> ValidationResult

Validate field according to SWIFT format rules
Source§

fn format_spec() -> &'static str

Get field format specification
Source§

impl StructuralPartialEq for Field23E

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,