pub struct ArtifactHandle { /* private fields */ }Expand description
One immutable content snapshot captured during Artifact admission.
Implementations§
Source§impl ArtifactHandle
impl ArtifactHandle
Sourcepub fn open(
path: impl Into<PathBuf>,
expected_digest: &str,
expected_size: u64,
) -> Result<Self, RuntimeFailure>
pub fn open( path: impl Into<PathBuf>, expected_digest: &str, expected_size: u64, ) -> Result<Self, RuntimeFailure>
Verifies one regular file and snapshots it in a process-private directory selected by the
Host’s system-temporary policy, independently of the source path. Strict isolation or
path-based execution on a no-exec temporary filesystem should use
Self::open_with_staging_root with a Host-owned executable root.
Sourcepub fn open_with_staging_root(
path: impl Into<PathBuf>,
expected_digest: &str,
expected_size: u64,
staging_root: impl AsRef<Path>,
) -> Result<Self, RuntimeFailure>
pub fn open_with_staging_root( path: impl Into<PathBuf>, expected_digest: &str, expected_size: u64, staging_root: impl AsRef<Path>, ) -> Result<Self, RuntimeFailure>
Verifies one Artifact and places its private stable copy under an explicit Host-owned root. Process-capable Hosts should select a root on a filesystem that permits execution.
Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
Returns the private stable copy containing the bytes admitted by this Handle. It is never serialized into a Plan.
Sourcepub fn source_path(&self) -> &Path
pub fn source_path(&self) -> &Path
Returns the original machine-local selection path for relative resource policy.
Sourcepub fn read_verified(&self) -> Result<Vec<u8>, RuntimeFailure>
pub fn read_verified(&self) -> Result<Vec<u8>, RuntimeFailure>
Returns the exact bytes captured during admission.
Trait Implementations§
Source§impl Clone for ArtifactHandle
impl Clone for ArtifactHandle
Source§fn clone(&self) -> ArtifactHandle
fn clone(&self) -> ArtifactHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more