Skip to main content

ic_backup/view/restore_reference_release/
mod.rs

1//! Product-qualified terminal intent and its complete original command identities.
2
3use crate::model::{artifacts::ArtifactChecksumRecord, command_custody::CommandCustodyRecord};
4
5/// Read-only result of a product's fresh complete terminal-journal validation.
6///
7/// Construction declares no terminal permission by itself. The guarded release
8/// boundary checks the current journal binding and actual quiescence of every
9/// retained command, while product qualification owns complete effect/application
10/// obligations and the completeness of this original command set.
11#[derive(Debug)]
12pub struct TerminalRestoreEvidence {
13    authority: ArtifactChecksumRecord,
14    commands: Vec<CommandCustodyRecord>,
15}
16
17impl TerminalRestoreEvidence {
18    /// Declare the validated original restore intent and complete original command set.
19    #[must_use]
20    pub const fn new(
21        authority: ArtifactChecksumRecord,
22        commands: Vec<CommandCustodyRecord>,
23    ) -> Self {
24        Self {
25            authority,
26            commands,
27        }
28    }
29
30    /// Return immutable original intent, independently compared with retained references.
31    #[must_use]
32    pub const fn authority(&self) -> &ArtifactChecksumRecord {
33        &self.authority
34    }
35
36    /// Return original command identities; no sidecar is created or inferred.
37    #[must_use]
38    pub fn commands(&self) -> &[CommandCustodyRecord] {
39        &self.commands
40    }
41}