pub struct ArtifactMetadata {
pub created_unix_ms: u64,
pub original_len: u64,
pub source_tier: String,
}Expand description
Optional per-artifact metadata, stored as a serde-encoded sidecar next to the blob.
The blob itself is opaque content-addressed bytes; nothing in the
envelope records when or from where it was produced. For
list-based auditing and GC (roadmap feature #9) that provenance is
useful, so DiskArtifactStore::put_with_metadata writes one of these
alongside the blob and DiskArtifactStore::metadata reads it back.
Metadata is strictly optional: a plain ArtifactStore::put writes no
sidecar, and DiskArtifactStore::metadata returns
ArtifactError::NotFound for a blob that has none.
Fields§
§created_unix_ms: u64Wall-clock creation time in Unix milliseconds, as recorded by the
writer at put_with_metadata time.
original_len: u64Length in bytes of the uncompressed payload. Lets an auditor size the store’s logical footprint without decoding every blob.
source_tier: StringFree-form origin tag (e.g. "jit-l2", "snapshot", "import") so
GC policy can treat artifacts from different producers differently.
Trait Implementations§
Source§impl Clone for ArtifactMetadata
impl Clone for ArtifactMetadata
Source§fn clone(&self) -> ArtifactMetadata
fn clone(&self) -> ArtifactMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArtifactMetadata
impl Debug for ArtifactMetadata
Source§impl<'de> Deserialize<'de> for ArtifactMetadata
impl<'de> Deserialize<'de> for ArtifactMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ArtifactMetadata
Source§impl PartialEq for ArtifactMetadata
impl PartialEq for ArtifactMetadata
Source§fn eq(&self, other: &ArtifactMetadata) -> bool
fn eq(&self, other: &ArtifactMetadata) -> bool
self and other values to be equal, and is used by ==.