iso20022_common/
lib.rs

1// Open Payment Message Parsing Library
2// https://github.com/Open-Payments/iso20022-rs
3//
4// This library is designed to parse message formats based on the ISO 20022 standards,
5// including but not limited to FedNow messages. It supports various financial message types,
6// such as customer credit transfers, payment status reports, administrative notifications, 
7// and other ISO 20022 messages, using Serde for efficient serialization and deserialization.
8//
9// Copyright (c) 2024 Open Payments
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14//     http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22// You may obtain a copy of this library at
23// https://github.com/Open-Payments/iso20022-rs
24
25pub mod common;
26
27pub use common::*;
28
29#[derive(Debug)]
30pub struct ValidationError {
31    pub code: u32,
32    pub message: String,
33}
34
35impl ValidationError {
36    pub fn new(code: u32, message: String) -> Self {
37        ValidationError { code, message }
38    }
39}