File tree Expand file tree Collapse file tree
crates/openshell-isolation-interface/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -487,8 +487,26 @@ impl SandboxConfirmEvidence {
487487
488488/// Ready boundary paired with the evidence measured by `confirm`.
489489pub struct ConfirmedBoundary {
490- pub boundary : Box < dyn ReadyBoundary > ,
491- pub evidence : SandboxConfirmEvidence ,
490+ boundary : Box < dyn ReadyBoundary > ,
491+ evidence : SandboxConfirmEvidence ,
492+ }
493+
494+ impl ConfirmedBoundary {
495+ /// Construct a confirmed state after backend-specific evidence validation.
496+ #[ allow( dead_code) ] // Implemented by the remote backend in the next stack layer.
497+ pub ( crate ) fn new ( boundary : Box < dyn ReadyBoundary > , evidence : SandboxConfirmEvidence ) -> Self {
498+ Self { boundary, evidence }
499+ }
500+
501+ /// Return the measured evidence carried by this confirmed state.
502+ pub fn evidence ( & self ) -> & SandboxConfirmEvidence {
503+ & self . evidence
504+ }
505+
506+ /// Consume confirmation and advance to the sole launch-capable state.
507+ pub fn into_boundary ( self ) -> Box < dyn ReadyBoundary > {
508+ self . boundary
509+ }
492510}
493511
494512/// Ready: standing enforcement is confirmed, and the backend is prepared to
Original file line number Diff line number Diff line change @@ -211,10 +211,10 @@ impl<K: MockKind> BoundBoundary for MockBound<K> {
211211 self . source . clone ( )
212212 }
213213 async fn confirm ( self : Box < Self > ) -> Result < ConfirmedBoundary , BackendError > {
214- Ok ( ConfirmedBoundary {
215- boundary : Box :: new ( MockReady :: < K > { _k : PhantomData } ) ,
216- evidence : confirmation_evidence ( ) ,
217- } )
214+ Ok ( ConfirmedBoundary :: new (
215+ Box :: new ( MockReady :: < K > { _k : PhantomData } ) ,
216+ confirmation_evidence ( ) ,
217+ ) )
218218 }
219219}
220220
You can’t perform that action at this time.
0 commit comments