pub enum ArtifactMetadata {
Audio {
duration_secs: f32,
format: String,
transcript_id: Option<ArtifactId>,
},
Image {
width: u32,
height: u32,
format: String,
alt_text: Option<String>,
},
Video {
duration_secs: f32,
format: String,
thumbnail_id: Option<ArtifactId>,
},
Transcript {
source_artifact_id: ArtifactId,
confidence: f32,
language: Option<String>,
},
Screenshot {
captured_at: Timestamp,
context: String,
width: Option<u32>,
height: Option<u32>,
},
}Expand description
Typed metadata for multimodal artifacts.
This enum provides strongly-typed metadata schemas for different artifact types.
It can be serialized to/from the generic metadata JSONB field.
Variants§
Audio
Metadata for audio artifacts
Fields
§
transcript_id: Option<ArtifactId>Optional linked transcript artifact
Image
Metadata for image artifacts
Fields
Video
Metadata for video artifacts
Fields
§
thumbnail_id: Option<ArtifactId>Optional linked thumbnail artifact
Transcript
Metadata for transcript artifacts (audio→text)
Fields
§
source_artifact_id: ArtifactIdSource audio artifact that was transcribed
Screenshot
Metadata for screenshot artifacts
Implementations§
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 ComposeSchema for ArtifactMetadata
impl ComposeSchema for ArtifactMetadata
Source§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
Source§impl PartialEq for ArtifactMetadata
impl PartialEq for ArtifactMetadata
Source§impl Serialize for ArtifactMetadata
impl Serialize for ArtifactMetadata
Source§impl ToSchema for ArtifactMetadata
impl ToSchema for ArtifactMetadata
impl StructuralPartialEq for ArtifactMetadata
Auto Trait Implementations§
impl Freeze for ArtifactMetadata
impl RefUnwindSafe for ArtifactMetadata
impl Send for ArtifactMetadata
impl Sync for ArtifactMetadata
impl Unpin 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