pub struct ArtifactStore { /* private fields */ }Expand description
Publishes verified images beneath one owned output root.
Implementations§
Source§impl ArtifactStore
impl ArtifactStore
Sourcepub fn new(
root: impl Into<PathBuf>,
limits: ImageLimits,
) -> Result<Self, BridgeError>
pub fn new( root: impl Into<PathBuf>, limits: ImageLimits, ) -> Result<Self, BridgeError>
Creates or opens an artifact root.
Sourcepub fn publish(
&self,
bytes: &[u8],
filename_prefix: Option<&str>,
expected_format: Option<OutputFormat>,
) -> Result<StoredArtifact, BridgeError>
pub fn publish( &self, bytes: &[u8], filename_prefix: Option<&str>, expected_format: Option<OutputFormat>, ) -> Result<StoredArtifact, BridgeError>
Verifies and atomically publishes one image without overwriting a file.
Sourcepub fn publish_with_options(
&self,
bytes: &[u8],
filename_prefix: Option<&str>,
expected_format: Option<OutputFormat>,
publication: ArtifactPublication<'_>,
) -> Result<StoredArtifact, BridgeError>
pub fn publish_with_options( &self, bytes: &[u8], filename_prefix: Option<&str>, expected_format: Option<OutputFormat>, publication: ArtifactPublication<'_>, ) -> Result<StoredArtifact, BridgeError>
Verifies and atomically publishes one image at a constrained relative location.
Sourcepub fn attach_metadata(
&self,
artifact_id: &str,
artifact_name: &str,
encoded: &[u8],
) -> Result<StoredSidecar, BridgeError>
pub fn attach_metadata( &self, artifact_id: &str, artifact_name: &str, encoded: &[u8], ) -> Result<StoredSidecar, BridgeError>
Atomically attaches bounded JSON metadata to an owned artifact.
Sourcepub fn read(
&self,
artifact_id: &str,
) -> Result<StoredArtifactContent, BridgeError>
pub fn read( &self, artifact_id: &str, ) -> Result<StoredArtifactContent, BridgeError>
Reads one ownership-verified artifact without exposing its filesystem path.
Sourcepub fn cleanup(
&self,
policy: RetentionPolicy,
now: SystemTime,
) -> Result<CleanupReport, BridgeError>
pub fn cleanup( &self, policy: RetentionPolicy, now: SystemTime, ) -> Result<CleanupReport, BridgeError>
Deletes only verified artifacts with bridge-created ownership records.
Sourcepub fn repair_orphans(
&self,
max_scan_entries: usize,
mode: ArtifactRepairMode,
) -> Result<ArtifactRepairReport, BridgeError>
pub fn repair_orphans( &self, max_scan_entries: usize, mode: ArtifactRepairMode, ) -> Result<ArtifactRepairReport, BridgeError>
Audits or repairs only unambiguous ownership-record orphans.
Audit mode is non-mutating. Apply mode removes a valid marker only when its artifact is absent, optionally removing an unchanged owned sidecar, or clears a missing-sidecar reference from an otherwise valid artifact. Invalid or changed content is always left untouched.
Trait Implementations§
Source§impl Clone for ArtifactStore
impl Clone for ArtifactStore
Source§fn clone(&self) -> ArtifactStore
fn clone(&self) -> ArtifactStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more