pub trait LocalHeadPolicy: SidecarReceiptAuthority {
// Required methods
fn permit_open(&mut self, root: &Path, chain: &[u8; 32]) -> bool;
fn admit_current(
&mut self,
root: &Path,
chain: &[u8; 32],
head: ChainHead,
) -> bool;
fn permit_commit(
&mut self,
root: &Path,
chain: &[u8; 32],
expected: ChainHead,
next: ChainHead,
receipt: &SidecarReceipt,
sidecar: &[u8; 768],
payload: &[u8],
) -> bool;
}Expand description
External policy establishes local root/ACL and rollback-resistant head state.
The host must hold a policy lease across final checks and file replacement;
callback results alone cannot make external revocation atomic with I/O.
Empty means authenticated genesis absence, not an unavailable lookup.
Required Methods§
fn permit_open(&mut self, root: &Path, chain: &[u8; 32]) -> bool
fn admit_current( &mut self, root: &Path, chain: &[u8; 32], head: ChainHead, ) -> bool
Sourcefn permit_commit(
&mut self,
root: &Path,
chain: &[u8; 32],
expected: ChainHead,
next: ChainHead,
receipt: &SidecarReceipt,
sidecar: &[u8; 768],
payload: &[u8],
) -> bool
fn permit_commit( &mut self, root: &Path, chain: &[u8; 32], expected: ChainHead, next: ChainHead, receipt: &SidecarReceipt, sidecar: &[u8; 768], payload: &[u8], ) -> bool
Check current Store policy and confirm the exact referenced bundle is published and admissible. This module does not perform that lookup.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".