pub struct ArtifactMetadata {Show 14 fields
pub artifact_id: ArtifactId,
pub execution_id: ExecutionId,
pub step_id: StepId,
pub name: String,
pub artifact_type: ArtifactType,
pub content_type: String,
pub original_size: u64,
pub compressed_size: u64,
pub compression: CompressionType,
pub content_hash: Option<String>,
pub storage_uri: Option<String>,
pub created_at: i64,
pub last_accessed_at: Option<i64>,
pub metadata: Option<Value>,
}Expand description
Metadata about a stored artifact
Fields§
§artifact_id: ArtifactIdUnique artifact ID
execution_id: ExecutionIdExecution that produced this artifact
step_id: StepIdStep that produced this artifact
name: StringName of the artifact
artifact_type: ArtifactTypeType of artifact
content_type: StringContent type (MIME type)
original_size: u64Original (uncompressed) size in bytes
compressed_size: u64Compressed size in bytes
compression: CompressionTypeCompression algorithm used
content_hash: Option<String>Content hash (SHA-256) for integrity verification
storage_uri: Option<String>Storage URI (for external storage backends)
created_at: i64Creation timestamp (Unix milliseconds)
last_accessed_at: Option<i64>Last access timestamp (Unix milliseconds)
metadata: Option<Value>Additional metadata
Implementations§
Source§impl ArtifactMetadata
impl ArtifactMetadata
Sourcepub fn new(
artifact_id: ArtifactId,
execution_id: ExecutionId,
step_id: StepId,
name: impl Into<String>,
artifact_type: ArtifactType,
) -> Self
pub fn new( artifact_id: ArtifactId, execution_id: ExecutionId, step_id: StepId, name: impl Into<String>, artifact_type: ArtifactType, ) -> Self
Create new artifact metadata
Sourcepub fn with_content_type(self, content_type: impl Into<String>) -> Self
pub fn with_content_type(self, content_type: impl Into<String>) -> Self
Set content type
Sourcepub fn with_original_size(self, size: u64) -> Self
pub fn with_original_size(self, size: u64) -> Self
Set original size
Sourcepub fn with_compressed_size(self, size: u64) -> Self
pub fn with_compressed_size(self, size: u64) -> Self
Set compressed size
Sourcepub fn with_compression(self, compression: CompressionType) -> Self
pub fn with_compression(self, compression: CompressionType) -> Self
Set compression type
Sourcepub fn with_content_hash(self, hash: impl Into<String>) -> Self
pub fn with_content_hash(self, hash: impl Into<String>) -> Self
Set content hash
Sourcepub fn with_storage_uri(self, uri: impl Into<String>) -> Self
pub fn with_storage_uri(self, uri: impl Into<String>) -> Self
Set storage URI
Sourcepub fn with_metadata(self, metadata: Value) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Set metadata
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Get compression ratio (compressed / original)
Sourcepub fn space_savings_percent(&self) -> f64
pub fn space_savings_percent(&self) -> f64
Get space savings percentage
Trait Implementations§
Source§impl Clone for ArtifactMetadata
impl Clone for ArtifactMetadata
Source§fn clone(&self) -> ArtifactMetadata
fn clone(&self) -> ArtifactMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ArtifactMetadata
impl RefUnwindSafe for ArtifactMetadata
impl Send for ArtifactMetadata
impl Sync for ArtifactMetadata
impl Unpin for ArtifactMetadata
impl UnsafeUnpin for ArtifactMetadata
impl UnwindSafe for ArtifactMetadata
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
Mutably borrows from an owned value. Read more