pub enum ChainEvent {
IterationStart {
iteration: usize,
limit: usize,
messages: Vec<Message>,
},
IterationEnd {
iteration: usize,
usage: Option<Usage>,
cumulative_usage: Option<Usage>,
tool_calls: Vec<ToolCall>,
},
BudgetExhausted {
cumulative_usage: Usage,
budget: u64,
},
}Expand description
Event emitted during chain loop execution for observability.
Variants§
IterationStart
Emitted before the provider is called for an iteration.
Fields
IterationEnd
Emitted after an iteration completes (chunks collected, tool calls extracted).
Fields
BudgetExhausted
Emitted when the budget is exhausted (after completing the current iteration).
Trait Implementations§
Source§impl Clone for ChainEvent
impl Clone for ChainEvent
Source§fn clone(&self) -> ChainEvent
fn clone(&self) -> ChainEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChainEvent
impl RefUnwindSafe for ChainEvent
impl Send for ChainEvent
impl Sync for ChainEvent
impl Unpin for ChainEvent
impl UnsafeUnpin for ChainEvent
impl UnwindSafe for ChainEvent
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