pub struct Artifact {
pub file_metadata: FileMetadata,
pub thread_id: String,
pub task_id: Option<String>,
pub tool_call_id: Option<String>,
}Expand description
Artifact metadata that combines filesystem metadata with context information
Fields§
§file_metadata: FileMetadataFilesystem metadata
thread_id: StringAssociated thread ID
task_id: Option<String>Associated task ID if available
tool_call_id: Option<String>Tool call ID that generated this artifact
Implementations§
Source§impl Artifact
impl Artifact
Sourcepub fn new(
file_metadata: FileMetadata,
thread_id: String,
task_id: Option<String>,
tool_call_id: Option<String>,
) -> Self
pub fn new( file_metadata: FileMetadata, thread_id: String, task_id: Option<String>, tool_call_id: Option<String>, ) -> Self
Create a new artifact with file metadata and context
Sourcepub fn artifact_path(&self) -> String
pub fn artifact_path(&self) -> String
Get the artifact path in the namespaced format
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Delegate display methods to file metadata
pub fn size_display(&self) -> String
pub fn summary(&self) -> String
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
Source§impl JsonSchema for Artifact
impl JsonSchema for Artifact
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Artifact
Auto Trait Implementations§
impl Freeze for Artifact
impl RefUnwindSafe for Artifact
impl Send for Artifact
impl Sync for Artifact
impl Unpin for Artifact
impl UnsafeUnpin 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