pub struct Message {
    pub transaction_ref_no: String,
    pub ref_to_related_msg: Option<String>,
    pub account_id: String,
    pub statement_no: String,
    pub sequence_no: Option<String>,
    pub opening_balance: Balance,
    pub statement_lines: Vec<StatementLine>,
    pub closing_balance: Balance,
    pub closing_available_balance: Option<AvailableBalance>,
    pub forward_available_balance: Option<AvailableBalance>,
    pub information_to_account_owner: Option<String>,
}
Expand description

A single, parsed MT940 message.

Many of these might be contained in a bank statement.

For specific field documentation, see here: http://www.sepaforcorporates.com/swift-for-corporates/account-statement-mt940-file-format-overview/

Fields

transaction_ref_no: String

Tag :20:

ref_to_related_msg: Option<String>

Tag :21:

account_id: String

Tag :25:

statement_no: String

Tag :28C:

sequence_no: Option<String>

Optional part of tag :28C:

opening_balance: Balance

Tag :60F: or :60M:

In case this is :60F: it is the first opening Balance. In case of :60M: this is the intermediate opening balance for statements following the first one.

statement_lines: Vec<StatementLine>

Tag :61: and :86:

Any :86: preceeded by :61: will provide more information to that :61:

closing_balance: Balance

Tag :62F: or :62M:

In case this is :62F: it is the first closing Balance. In case of :62M: this is the intermediate closing balance for statements following the first one.

closing_available_balance: Option<AvailableBalance>

Tag :64:

forward_available_balance: Option<AvailableBalance>

Tag :65:

information_to_account_owner: Option<String>

Tag :86:

A tag :86: not preceeded by a tag :61 will provide information for the whole Message as opposed to just the StatementLine.

Implementations

Construct a new Message from a list of [Field]s.

Must start with field :20:. Must not contain more than one :20: tag.

Trait Implementations

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.