#[non_exhaustive]pub enum EventType {
Show 21 variants
UserMessage,
AgentMessage,
SystemMessage,
Thinking,
ToolCall {
name: String,
},
ToolResult {
name: String,
is_error: bool,
call_id: Option<String>,
},
FileRead {
path: String,
},
CodeSearch {
query: String,
},
FileSearch {
pattern: String,
},
FileEdit {
path: String,
diff: Option<String>,
},
FileCreate {
path: String,
},
FileDelete {
path: String,
},
ShellCommand {
command: String,
exit_code: Option<i32>,
},
ImageGenerate {
prompt: String,
},
VideoGenerate {
prompt: String,
},
AudioGenerate {
prompt: String,
},
WebSearch {
query: String,
},
WebFetch {
url: String,
},
TaskStart {
title: Option<String>,
},
TaskEnd {
summary: Option<String>,
},
Custom {
kind: String,
},
}Expand description
Event type - the core abstraction
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UserMessage
AgentMessage
SystemMessage
Thinking
ToolCall
ToolResult
FileRead
CodeSearch
FileSearch
FileEdit
FileCreate
FileDelete
ShellCommand
ImageGenerate
VideoGenerate
AudioGenerate
WebSearch
WebFetch
TaskStart
TaskEnd
Custom
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EventType
impl Serialize for EventType
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
Auto Trait Implementations§
impl Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
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