Skip to main content

CustodyAuthority

Trait CustodyAuthority 

Source
pub trait CustodyAuthority: SidecarReceiptAuthority {
    // Required methods
    fn permit_publish(
        &mut self,
        root: &Path,
        receipt: &SidecarReceipt,
        sidecar: &[u8; 768],
        payload: &[u8],
        total_bytes: usize,
    ) -> bool;
    fn permit_read(
        &mut self,
        root: &Path,
        checkpoint: &[u8; 32],
        max_bytes: usize,
    ) -> bool;
}
Expand description

Host checks are trust boundaries, not OS-enforced locality or locks. The caller must hold an exclusive chain lease across the complete operation.

Required Methods§

Source

fn permit_publish( &mut self, root: &Path, receipt: &SidecarReceipt, sidecar: &[u8; 768], payload: &[u8], total_bytes: usize, ) -> bool

Admit the root and budget, enforce locality, directory ownership and restrictive traversal/read ACLs (including Windows file inheritance), and verify the exclusive chain lease and current Store policy.

Source

fn permit_read( &mut self, root: &Path, checkpoint: &[u8; 32], max_bytes: usize, ) -> bool

Admit reading this exact checkpoint under current policy before any I/O.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§