pub enum EventData {
Show 13 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>,
},
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
SessionRestore
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<EventData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EventData
impl Serialize for EventData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more