#[non_exhaustive]pub enum Event {
Init(Info),
User(UserMessage),
Reasoning(Text),
Assistant(Text),
ToolUse(ToolUse),
ToolResult(ToolResult),
Approval(Approval),
ApprovalRequest(ApprovalRequest),
Compacted(Compacted),
Result(TurnResult),
}Expand description
One event of a session, one per outbound line type (R8.5.1).
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.
Init(Info)
The session started (yielded by query only).
User(UserMessage)
A prompt, or a steer that landed.
Reasoning(Text)
The model’s reasoning.
Assistant(Text)
The model’s visible text.
ToolUse(ToolUse)
A tool call.
ToolResult(ToolResult)
A tool call’s outcome.
Approval(Approval)
A gate’s decision.
ApprovalRequest(ApprovalRequest)
A gate waiting for an answer.
Compacted(Compacted)
The context was compacted.
Result(TurnResult)
The turn ended.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
impl Freeze for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
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