pub enum EventData {
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,
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>,
},
Progress {
message: String,
percentage: Option<u8>,
},
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>,
},
}Expand description
Event data
Variants§
Text
Thinking
ToolUse
ToolUseInput
ToolResult
Error
Usage
Fields
Progress
Compression
Memory
Keywords
AskQuestion
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