Mountain/IPC/Enhanced/SecureMessageChannel/SecureMessage.rs
1#![allow(non_snake_case)]
2
3//! Generic encrypted-message wrapper carrying additional
4//! routing headers and a protocol version. The phantom `T`
5//! is the original plaintext type; the wrapper itself
6//! serialises only the encrypted envelope + headers + version.
7
8use std::{collections::HashMap, marker::PhantomData};
9
10use serde::{Deserialize, Serialize};
11
12use crate::IPC::Enhanced::SecureMessageChannel::EncryptedMessage;
13
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub struct Struct<T> {
16 pub encrypted:EncryptedMessage::Struct,
17 pub headers:HashMap<String, String>,
18 pub version:String,
19 #[serde(skip)]
20 pub(super) _marker:PhantomData<T>,
21}