#[non_exhaustive]pub enum AgentRunMessage {
Event(RuntimeEvent),
ToolInvocations {
batch: PendingToolCallBatch,
},
}Expand description
Message emitted by an AgentRun.
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.
Event(RuntimeEvent)
Public SDK/UI event.
ToolInvocations
Ordered host-owned tool calls from one runtime execution wave.
Runtime-owned calls from the same model response are executed internally and are not emitted here. A single host call is represented as a one-call batch; calls are never combined across model responses or separate run reads.
Fields
§
batch: PendingToolCallBatchRuntime-owned batch ID and host-owned calls in provider/model order. Every call must be resolved before the run can request the next runtime execution wave or model response.
Implementations§
Source§impl AgentRunMessage
impl AgentRunMessage
pub fn as_event(&self) -> Option<&RuntimeEvent>
Sourcepub fn as_tool_invocations(&self) -> Option<&PendingToolCallBatch>
pub fn as_tool_invocations(&self) -> Option<&PendingToolCallBatch>
Borrows the runtime-owned tool batch when this message carries a host invocation handoff.
Trait Implementations§
Source§impl Clone for AgentRunMessage
impl Clone for AgentRunMessage
Source§impl Debug for AgentRunMessage
impl Debug for AgentRunMessage
impl Eq for AgentRunMessage
Source§impl PartialEq for AgentRunMessage
impl PartialEq for AgentRunMessage
impl StructuralPartialEq for AgentRunMessage
Auto Trait Implementations§
impl Forget for AgentRunMessage
impl Freeze for AgentRunMessage
impl Move for AgentRunMessage
impl RefUnwindSafe for AgentRunMessage
impl Send for AgentRunMessage
impl Sync for AgentRunMessage
impl Unpin for AgentRunMessage
impl UnsafeUnpin for AgentRunMessage
impl UnwindSafe for AgentRunMessage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.