pub enum EventData {
Show 19 variants
Text {
delta: String,
},
Thinking {
delta: String,
signature: Option<String>,
},
ToolUse {
id: String,
name: String,
input: Option<Value>,
},
ToolUseInput {
id: String,
delta: String,
},
ToolResult {
tool_use_id: String,
name: String,
detail: Option<String>,
content: String,
is_error: bool,
},
Error {
message: String,
code: Option<String>,
source: Option<String>,
},
Usage {
input_tokens: u64,
output_tokens: u64,
cache_creation_input_tokens: Option<u64>,
cache_read_input_tokens: Option<u64>,
},
SessionRestore {
input_tokens: u64,
total_output_tokens: u64,
message_count: usize,
},
Progress {
message: String,
percentage: Option<u8>,
},
ContextSize {
context_size: u64,
},
Compression {
original_tokens: u64,
compressed_tokens: u64,
ratio: f32,
},
Memory {
summary: String,
entries_count: usize,
},
Keywords {
keywords: Vec<String>,
source: String,
},
AskQuestion {
question: String,
options: Option<Value>,
},
ProxyToolRequest {
request_id: String,
tool_name: String,
tool_input: Value,
metadata: ProxyMetadata,
},
ProxyToolResponse {
request_id: String,
result: String,
is_error: bool,
},
DebugLog {
category: String,
message: String,
},
SkillsLoaded {
names: Vec<String>,
},
WorkflowsLoaded {
names: Vec<String>,
},
}Expand description
Event data
Variants§
Text
Thinking
ToolUse
ToolUseInput
ToolResult
Error
Usage
Fields
SessionRestore
Progress
ContextSize
Compression
Memory
Keywords
AskQuestion
ProxyToolRequest
Proxy tool request - needs external execution
ProxyToolResponse
Proxy tool response - external execution result
DebugLog
SkillsLoaded
WorkflowsLoaded
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventData
impl<'de> Deserialize<'de> for EventData
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
impl StructuralPartialEq for EventData
Auto Trait Implementations§
impl Freeze for EventData
impl RefUnwindSafe for EventData
impl Send for EventData
impl Sync for EventData
impl Unpin for EventData
impl UnsafeUnpin for EventData
impl UnwindSafe for EventData
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