pub struct TraceFile {
pub path: String,
pub conversations: Vec<TraceConversation>,
}Expand description
A file with attributed conversation ranges.
Fields§
§path: StringRelative file path from repository root.
conversations: Vec<TraceConversation>Array of conversations that contributed to this file.
Implementations§
Source§impl TraceFile
impl TraceFile
Sourcepub fn add_conversation(&mut self, conversation: TraceConversation)
pub fn add_conversation(&mut self, conversation: TraceConversation)
Add a conversation to the file.
Sourcepub fn with_ai_ranges(
path: impl Into<String>,
model_id: impl Into<String>,
ranges: Vec<TraceRange>,
) -> Self
pub fn with_ai_ranges( path: impl Into<String>, model_id: impl Into<String>, ranges: Vec<TraceRange>, ) -> Self
Create a file with a single AI-attributed conversation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TraceFile
impl<'de> Deserialize<'de> for TraceFile
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 TraceFile
impl JsonSchema for TraceFile
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for TraceFile
Auto Trait Implementations§
impl Freeze for TraceFile
impl RefUnwindSafe for TraceFile
impl Send for TraceFile
impl Sync for TraceFile
impl Unpin for TraceFile
impl UnwindSafe for TraceFile
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