use crate::report::ReportDataSource;
use std::path::Path;
pub(in crate::sns::report) struct SnsReportProvenance {
pub(in crate::sns::report) data_source: ReportDataSource,
pub(in crate::sns::report) cache_path: Option<String>,
pub(in crate::sns::report) cache_complete: Option<bool>,
}
impl SnsReportProvenance {
pub(in crate::sns::report) const fn live() -> Self {
Self {
data_source: ReportDataSource::Live,
cache_path: None,
cache_complete: None,
}
}
pub(in crate::sns::report) fn cache(cache_path: &Path, cache_complete: bool) -> Self {
Self {
data_source: ReportDataSource::Cache,
cache_path: Some(cache_path.display().to_string()),
cache_complete: Some(cache_complete),
}
}
}