Skip to main content

Mountain/IPC/Enhanced/SecureMessageChannel/
SecureMessage.rs

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