pub enum EventType {
Show 36 variants
TextMessageStart,
TextMessageContent,
TextMessageEnd,
TextMessageChunk,
ToolCallStart,
ToolCallArgs,
ToolCallEnd,
ToolCallChunk,
ToolCallResult,
ThinkingStart,
ThinkingEnd,
ThinkingTextMessageStart,
ThinkingTextMessageContent,
ThinkingTextMessageEnd,
StateSnapshot,
StateDelta,
MessagesSnapshot,
ActivitySnapshot,
ActivityDelta,
Raw,
Custom,
RunStarted,
RunFinished,
RunError,
StepStarted,
StepFinished,
ReasoningStart,
ReasoningMessageStart,
ReasoningMessageContent,
ReasoningMessageEnd,
ReasoningMessageChunk,
ReasoningEnd,
ReasoningEncryptedValue,
SubagentStarted,
SubagentFinished,
SubagentError,
}Expand description
The type discriminator of an Event, on its own.
Useful for routing and filtering without matching the payload.
Exhaustive for the same reason Event is, and
EventType::ALL is the list, in upstream order.
Variants§
TextMessageStart
Opens a text message. See TextMessageStartEvent.
TextMessageContent
Appends to a text message. See TextMessageContentEvent.
TextMessageEnd
Closes a text message. See TextMessageEndEvent.
TextMessageChunk
A whole text update in one event. See TextMessageChunkEvent.
ToolCallStart
Opens a tool call. See ToolCallStartEvent.
ToolCallArgs
Appends tool-call arguments. See ToolCallArgsEvent.
ToolCallEnd
Closes a tool call. See ToolCallEndEvent.
ToolCallChunk
A whole tool call in one event. See ToolCallChunkEvent.
ToolCallResult
A tool call’s result. See ToolCallResultEvent.
ThinkingStart
Opens a thinking block. See ThinkingStartEvent.
ThinkingEnd
Closes a thinking block. See ThinkingEndEvent.
ThinkingTextMessageStart
Opens a thinking message. See ThinkingTextMessageStartEvent.
ThinkingTextMessageContent
Appends thinking text. See ThinkingTextMessageContentEvent.
ThinkingTextMessageEnd
Closes a thinking message. See ThinkingTextMessageEndEvent.
StateSnapshot
Replaces the shared state. See StateSnapshotEvent.
StateDelta
Patches the shared state. See StateDeltaEvent.
MessagesSnapshot
Replaces the message history. See MessagesSnapshotEvent.
ActivitySnapshot
Publishes an activity. See ActivitySnapshotEvent.
ActivityDelta
Patches an activity. See ActivityDeltaEvent.
Raw
Forwards a provider event. See RawEvent.
Custom
An application-defined event. See CustomEvent.
RunStarted
Starts a run. See RunStartedEvent.
RunFinished
Finishes or pauses a run. See RunFinishedEvent.
RunError
Fails a run. See RunErrorEvent.
StepStarted
Starts a step. See StepStartedEvent.
StepFinished
Finishes a step. See StepFinishedEvent.
ReasoningStart
Opens a reasoning block. See ReasoningStartEvent.
ReasoningMessageStart
Opens a reasoning message. See ReasoningMessageStartEvent.
ReasoningMessageContent
Appends reasoning text. See ReasoningMessageContentEvent.
ReasoningMessageEnd
Closes a reasoning message. See ReasoningMessageEndEvent.
ReasoningMessageChunk
A whole reasoning update in one event. See ReasoningMessageChunkEvent.
ReasoningEnd
Closes a reasoning block. See ReasoningEndEvent.
ReasoningEncryptedValue
Carries an encrypted reasoning blob. See ReasoningEncryptedValueEvent.
SubagentStarted
Announces a subagent invocation. See SubagentStartedEvent.
SubagentFinished
Closes a subagent invocation. See SubagentFinishedEvent.
SubagentError
Fails a subagent invocation. See SubagentErrorEvent.
Implementations§
Source§impl EventType
impl EventType
Sourcepub const fn is_attributable(self) -> bool
pub const fn is_attributable(self) -> bool
Whether this event type carries the optional subagentRunId
attribution — 24 of the 36 do.
The three SUBAGENT_* lifecycle events return false: they carry the
field as their required subject, not as a tag. The run lifecycle,
MESSAGES_SNAPSHOT (whose messages carry their own) and the deprecated
THINKING_* family have no such field.
Trait Implementations§
impl Copy for EventType
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
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>,
impl Eq for EventType
Source§impl JsonSchema for EventType
impl JsonSchema for EventType
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for EventType
impl Ord for EventType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for EventType
impl PartialOrd for EventType
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.