pub enum Event<'a> {
Request(&'a mut Request),
Signal(&'a Signals),
Decision {
request: &'a mut Request,
decision: &'a dyn Decision,
},
ModelResponse(&'a AggLlmResponse),
}Expand description
An event observed by the algorithm. Events are consumed by Processor to mutate state.
Request-bearing variants (Event::Request, Event::Decision) borrow the request
mutably, so a processor may rewrite it in place and the edit propagates to the rest of
the chain and to the model call. The observation-only variants stay immutable.
Variants§
Request(&'a mut Request)
The inbound request that begins a turn.
Signal(&'a Signals)
An out-of-band agentic-stack signal (tool results, budget updates, …).
Decision
A routing decision paired with the request that produced it.
The request is rewritable: a processor may add instructions or notes here that are bound to the routing outcome (e.g. a tier-specific system prompt).
Fields
ModelResponse(&'a AggLlmResponse)
A buffered response received back from a model.
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> !RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
impl<'a> !UnwindSafe for Event<'a>
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