pub struct SwiftMessage<T: SwiftMessageBody> {
pub basic_header: BasicHeader,
pub application_header: ApplicationHeader,
pub user_header: Option<UserHeader>,
pub trailer: Option<Trailer>,
pub message_type: String,
pub fields: T,
}
Expand description
Complete SWIFT message (headers + typed body)
Fields§
§basic_header: BasicHeader
Basic Header (Block 1)
application_header: ApplicationHeader
Application Header (Block 2)
user_header: Option<UserHeader>
User Header (Block 3) - Optional
trailer: Option<Trailer>
Trailer (Block 5) - Optional
message_type: String
Message type identifier
fields: T
Parsed message body with typed fields
Implementations§
Source§impl<T: SwiftMessageBody> SwiftMessage<T>
impl<T: SwiftMessageBody> SwiftMessage<T>
Sourcepub fn has_reject_codes(&self) -> bool
pub fn has_reject_codes(&self) -> bool
Check if message contains reject codes (REJT in field 20, block 3 MUR, or field 72)
Sourcepub fn has_return_codes(&self) -> bool
pub fn has_return_codes(&self) -> bool
Check if message contains return codes (RETN in field 20, block 3 MUR, or field 72)
pub fn is_cover_message(&self) -> bool
pub fn is_stp_message(&self) -> bool
Sourcepub fn validate(&self) -> ValidationResult
pub fn validate(&self) -> ValidationResult
Validate message using SWIFT SR2025 network validation rules
pub fn to_mt_message(&self) -> String
Trait Implementations§
Source§impl<T: Clone + SwiftMessageBody> Clone for SwiftMessage<T>
impl<T: Clone + SwiftMessageBody> Clone for SwiftMessage<T>
Source§fn clone(&self) -> SwiftMessage<T>
fn clone(&self) -> SwiftMessage<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug + SwiftMessageBody> Debug for SwiftMessage<T>
impl<T: Debug + SwiftMessageBody> Debug for SwiftMessage<T>
Source§impl<'de, T> Deserialize<'de> for SwiftMessage<T>where
T: Deserialize<'de> + SwiftMessageBody,
impl<'de, T> Deserialize<'de> for SwiftMessage<T>where
T: Deserialize<'de> + SwiftMessageBody,
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<T> Serialize for SwiftMessage<T>where
T: Serialize + SwiftMessageBody,
impl<T> Serialize for SwiftMessage<T>where
T: Serialize + SwiftMessageBody,
Auto Trait Implementations§
impl<T> Freeze for SwiftMessage<T>where
T: Freeze,
impl<T> RefUnwindSafe for SwiftMessage<T>where
T: RefUnwindSafe,
impl<T> Send for SwiftMessage<T>
impl<T> Sync for SwiftMessage<T>
impl<T> Unpin for SwiftMessage<T>where
T: Unpin,
impl<T> UnwindSafe for SwiftMessage<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more