stdlib/swiftView source ↗
swift
33 items · generated by scribe fromstdlib/swift.fd· synced 2026-11-15
Contents
- SWIFT_MT103: (const)
- SWIFT_MT202: (const)
- SWIFT_MT900: (const)
- SWIFT_MT910: (const)
- SWIFT_MT940: (const)
- SWIFT_MT942: (const)
- SWIFT_MT199: (const)
- SWIFT_MT299: (const)
- SWIFT_MT300: (const)
- SWIFT_MT320: (const)
- SWIFT_MT700: (const)
- SWIFT_MT760: (const)
- swift_mt_name (function)
- swift_bic_validate (function)
- swift_bic_bank_code (function)
- swift_bic_country (function)
- swift_bic_location (function)
- swift_bic_branch (function)
- swift_iban_validate_length (function)
- swift_iban_country (function)
- swift_iban_check_digits (function)
- swift_iban_bban (function)
- MT103 (struct)
- swift_mt103_new (function)
- swift_mt103_set_ordering (function)
- swift_mt103_set_beneficiary (function)
- swift_mt103_set_remittance (function)
- swift_mt103_set_value_date (function)
- swift_mt103_serialize (function)
- swift_mt103_amount_major (function)
- swift_mt103_amount_formatted (function)
- swift_parse_field (function)
- swift_extract_field (function)
SWIFT_MT103:
pub const SWIFT_MT103: i64 = 103; // Customer Credit TransferDefined at line 25
SWIFT_MT202:
pub const SWIFT_MT202: i64 = 202; // General Financial Institution TransferDefined at line 26
SWIFT_MT900:
pub const SWIFT_MT900: i64 = 900; // Confirmation of DebitDefined at line 27
SWIFT_MT910:
pub const SWIFT_MT910: i64 = 910; // Confirmation of CreditDefined at line 28
SWIFT_MT940:
pub const SWIFT_MT940: i64 = 940; // Statement MessageDefined at line 29
SWIFT_MT942:
pub const SWIFT_MT942: i64 = 942; // Interim Transaction ReportDefined at line 30
SWIFT_MT199:
pub const SWIFT_MT199: i64 = 199; // Free Format MessageDefined at line 31
SWIFT_MT299:
pub const SWIFT_MT299: i64 = 299; // Free Format Message (FIN)Defined at line 32
SWIFT_MT300:
pub const SWIFT_MT300: i64 = 300; // Foreign Exchange ConfirmationDefined at line 33
SWIFT_MT320:
pub const SWIFT_MT320: i64 = 320; // Loan/Deposit ConfirmationDefined at line 34
SWIFT_MT700:
pub const SWIFT_MT700: i64 = 700; // Issue of a Documentary CreditDefined at line 35
SWIFT_MT760:
pub const SWIFT_MT760: i64 = 760; // GuaranteeDefined at line 36
swift_mt_name
Get SWIFT message type name.
pub fn swift_mt_name(mt: i64) -> str {Parameters:
mt:i64
Returns: str
Defined at line 39
swift_bic_validate
Validate a BIC code (8 or 11 characters).
pub fn swift_bic_validate(bic: str) -> bool {Parameters:
bic:str
Returns: bool
Defined at line 89
swift_bic_bank_code
Get the bank code (first 4 characters) from a BIC.
pub fn swift_bic_bank_code(bic: str) -> str {Parameters:
bic:str
Returns: str
Defined at line 105
swift_bic_country
Get the country code (characters 5-6) from a BIC.
pub fn swift_bic_country(bic: str) -> str {Parameters:
bic:str
Returns: str
Defined at line 110
swift_bic_location
Get the location code (characters 7-8) from a BIC.
pub fn swift_bic_location(bic: str) -> str {Parameters:
bic:str
Returns: str
Defined at line 115
swift_bic_branch
Get the branch code (characters 9-11) from a BIC. Returns “XXX” if not present (primary office).
pub fn swift_bic_branch(bic: str) -> str {Parameters:
bic:str
Returns: str
Defined at line 121
swift_iban_validate_length
Validate IBAN length by country code.
pub fn swift_iban_validate_length(iban: str) -> bool {Parameters:
iban:str
Returns: bool
Defined at line 135
swift_iban_country
Get country code from IBAN.
pub fn swift_iban_country(iban: str) -> str {Parameters:
iban:str
Returns: str
Defined at line 192
swift_iban_check_digits
Get check digits from IBAN (characters 3-4).
pub fn swift_iban_check_digits(iban: str) -> str {Parameters:
iban:str
Returns: str
Defined at line 197
swift_iban_bban
Get BBAN (Basic Bank Account Number) from IBAN (characters 5+).
pub fn swift_iban_bban(iban: str) -> str {Parameters:
iban:str
Returns: str
Defined at line 202
MT103
An MT103 message structure.
pub struct MT103 {Fields:
| Name | Type |
|---|---|
sender_bic | str |
receiver_bic | str |
message_id | str |
amount | i64 |
currency | str |
ordering_customer | str |
beneficiary_customer | str |
ordering_institution | str |
beneficiary_institution | str |
remittance_info | str |
value_date | str |
Defined at line 212
swift_mt103_new
Create a new MT103 message.
pub fn swift_mt103_new(sender_bic: str, receiver_bic: str, amount_cents: i64, currency: str) -> MT103 {Parameters:
sender_bic:strreceiver_bic:stramount_cents:i64currency:str
Returns: MT103
Defined at line 229
swift_mt103_set_ordering
Set ordering customer (party initiating the payment).
pub fn swift_mt103_set_ordering(msg: & mut MT103, customer: str, institution: str) -> void {Parameters:
msg:& mut MT103customer:strinstitution:str
Returns: void
Defined at line 236
swift_mt103_set_beneficiary
Set beneficiary customer (party receiving the payment).
pub fn swift_mt103_set_beneficiary(msg: & mut MT103, customer: str, institution: str) -> void {Parameters:
msg:& mut MT103customer:strinstitution:str
Returns: void
Defined at line 242
swift_mt103_set_remittance
Set remittance information (payment reference).
pub fn swift_mt103_set_remittance(msg: & mut MT103, info: str) -> void {Parameters:
msg:& mut MT103info:str
Returns: void
Defined at line 248
swift_mt103_set_value_date
Set value date (YYMMDD format).
pub fn swift_mt103_set_value_date(msg: & mut MT103, date: str) -> void {Parameters:
msg:& mut MT103date:str
Returns: void
Defined at line 253
swift_mt103_serialize
Serialize an MT103 message to SWIFT text format.
pub fn swift_mt103_serialize(msg: MT103) -> str {Parameters:
msg:MT103
Returns: str
Defined at line 258
swift_mt103_amount_major
Get the amount in major currency units (e.g. dollars, not cents).
pub fn swift_mt103_amount_major(msg: MT103) -> f64 {Parameters:
msg:MT103
Returns: f64
Defined at line 299
swift_mt103_amount_formatted
Get the amount as a formatted string (e.g. “1000.00 USD”).
pub fn swift_mt103_amount_formatted(msg: MT103) -> str {Parameters:
msg:MT103
Returns: str
Defined at line 304
swift_parse_field
Parse a field tag and value from a SWIFT text line. Format: “:TAG:VALUE” (e.g. “:20:REF12345”) Returns (tag, value) as a Vec [tag_str, value_str].
pub fn swift_parse_field(line: str) -> Vec<str> {Parameters:
line:str
Returns: Vec<str>
Defined at line 320
swift_extract_field
Extract a specific field from a SWIFT text block. Returns the field value, or "" if not found.
pub fn swift_extract_field(text: str, tag: str) -> str {Parameters:
text:strtag:str
Returns: str
Defined at line 356
Generated by scribe, the Fides documentation generator