pub enum InvocationEvent {
Agent(AgentEvent),
Chat(ChatStreamEvent),
}Expand description
Unified event envelope wrapping runtime and chat-stream events.
The core on loop only produces the Agent
variant from AgentRuntime::subscribe. The Chat
variant is populated by transport adapters that surface provider streams.
Variants§
Agent(AgentEvent)
Event from the agent runtime event bus.
Chat(ChatStreamEvent)
Event from a chat stream. Populated by transport adapters.
Implementations§
Source§impl InvocationEvent
impl InvocationEvent
Sourcepub fn run_id(&self) -> Option<RunId>
pub fn run_id(&self) -> Option<RunId>
Returns the run id when derivable from an AgentEvent.
Chat-stream events carry no run id; None is returned for them.
Sourcepub fn as_agent(&self) -> Option<&AgentEvent>
pub fn as_agent(&self) -> Option<&AgentEvent>
Returns the wrapped AgentEvent when this is the Agent variant.
Trait Implementations§
Source§impl Clone for InvocationEvent
impl Clone for InvocationEvent
Source§fn clone(&self) -> InvocationEvent
fn clone(&self) -> InvocationEvent
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 InvocationEvent
impl RefUnwindSafe for InvocationEvent
impl Send for InvocationEvent
impl Sync for InvocationEvent
impl Unpin for InvocationEvent
impl UnsafeUnpin for InvocationEvent
impl UnwindSafe for InvocationEvent
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