mithril_common/entities/signable_manifest.rs
1use std::collections::BTreeMap;
2
3use serde::{Deserialize, Serialize};
4
5use crate::crypto_helper::ManifestSignature;
6
7/// Stores a map of files and their hashes, with an optional signature to verify the integrity of the
8/// signed data.
9#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10pub struct SignableManifest<TKey: Ord, TValue> {
11 /// The data stored in the manifest
12 pub data: BTreeMap<TKey, TValue>,
13 /// The signature of the manifest
14 #[serde(skip_serializing_if = "Option::is_none")]
15 pub signature: Option<ManifestSignature>,
16}