mithril_aggregator/immutable_file_digest_mapper.rs
1use std::collections::BTreeMap;
2
3use async_trait::async_trait;
4
5use mithril_common::{
6 entities::{HexEncodedDigest, ImmutableFileName},
7 StdResult,
8};
9
10/// A trait for mapping [ImmutableFileName]s to their digests.
11#[cfg_attr(test, mockall::automock)]
12#[async_trait]
13pub trait ImmutableFileDigestMapper: Sync + Send {
14 /// Associate each given [immutable files][ImmutableFileName] with a digest.
15 async fn get_immutable_file_digest_map(
16 &self,
17 ) -> StdResult<BTreeMap<ImmutableFileName, HexEncodedDigest>>;
18}