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§impl Debug for ArtifactHandle
impl Debug for ArtifactHandle
impl Eq for ArtifactHandle
Auto Trait Implementations§
impl Freeze for ArtifactHandle
impl RefUnwindSafe for ArtifactHandle
impl Send for ArtifactHandle
impl Sync for ArtifactHandle
impl Unpin for ArtifactHandle
impl UnsafeUnpin for ArtifactHandle
impl UnwindSafe for ArtifactHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.