pub struct Artifact {
pub content: ArtifactContent,
pub content_type: Option<String>,
pub metadata: HashMap<String, Value>,
pub artifact_id: Option<String>,
pub trace_correlation_id: Option<String>,
pub size_bytes: Option<i64>,
pub sha256: Option<String>,
pub storage: Option<HashMap<String, Value>>,
pub created_at: Option<String>,
pub name: Option<String>,
pub description: Option<String>,
}Expand description
An artifact produced during a rollout or evaluation.
Fields§
§content: ArtifactContentThe artifact content.
content_type: Option<String>MIME type (e.g., “text/plain”, “application/json”, “image/png”).
metadata: HashMap<String, Value>Additional metadata.
artifact_id: Option<String>Unique artifact ID.
trace_correlation_id: Option<String>Correlation ID linking to a trace.
size_bytes: Option<i64>Size in bytes.
sha256: Option<String>SHA-256 hash of content.
storage: Option<HashMap<String, Value>>Storage location information.
created_at: Option<String>When the artifact was created.
name: Option<String>Name/label for the artifact.
description: Option<String>Description.
Implementations§
Source§impl Artifact
impl Artifact
Sourcepub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
Set the trace correlation ID.
Sourcepub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
pub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
Add metadata.
Sourcepub fn validate_size(&self, max_size_bytes: i64) -> Result<(), String>
pub fn validate_size(&self, max_size_bytes: i64) -> Result<(), String>
Validate artifact size against a maximum.
Sourcepub fn compute_size(&mut self)
pub fn compute_size(&mut self)
Calculate and set size_bytes from content.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Artifact
impl<'de> Deserialize<'de> for Artifact
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 Artifact
impl RefUnwindSafe for Artifact
impl Send for Artifact
impl Sync for Artifact
impl Unpin for Artifact
impl UnwindSafe for Artifact
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request