diff options
author | rtkay123 <dev@kanjala.com> | 2025-08-08 08:01:13 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-08-08 08:01:13 +0200 |
commit | fd81550cd9b49c138f384dd7c097729d66f1e0b0 (patch) | |
tree | 8566e9647715c9a5af09a3d7a6bace77f0c86f71 /lib/warden-core/src/iso20022.rs | |
parent | 68a4edcdf7af5e8c5eef04b9b65683229644f29a (diff) | |
download | warden-fd81550cd9b49c138f384dd7c097729d66f1e0b0.tar.bz2 warden-fd81550cd9b49c138f384dd7c097729d66f1e0b0.zip |
build(proto): compile time iso20022 types
Diffstat (limited to 'lib/warden-core/src/iso20022.rs')
-rw-r--r-- | lib/warden-core/src/iso20022.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/warden-core/src/iso20022.rs b/lib/warden-core/src/iso20022.rs new file mode 100644 index 0000000..e9e4a24 --- /dev/null +++ b/lib/warden-core/src/iso20022.rs @@ -0,0 +1,32 @@ +#[derive(Debug)] +pub enum TransactionType { + PACS008, + PACS002, +} + +impl std::fmt::Display for TransactionType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + TransactionType::PACS002 => "pacs.002.001.12", + TransactionType::PACS008 => "pacs.008.001.12", + } + ) + } +} + +/// Pacs008 file descriptor +pub const ISO20022_FILE_DESCRIPTOR_SET: &[u8] = + tonic::include_file_descriptor_set!("iso20022_descriptor"); + +/// pacs.008.001.12 +pub mod pacs008 { + tonic::include_proto!("iso20022.pacs008"); +} + +/// pacs.002.001.12 +pub mod pacs002 { + tonic::include_proto!("iso20022.pacs002"); +} |