#[non_exhaustive]pub enum StreamedTurnEvent {
EmitIngested,
EmitToolCallDelta,
HoldToolCall,
EmitToolCall {
call: ToolCall,
},
InvalidToolCall(StreamedInvalidToolCall),
}Expand description
Required driver action after ingesting a stream item.
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.
EmitIngested
Forward the ingested item to the consumer as-is.
EmitToolCallDelta
Forward the ingested argument fragment of a call to an allowed tool, once the tool-call delta hooks let it through. The call is not executable until its end.
HoldToolCall
Hold the ingested item back: it belongs to a call naming a tool the turn does not allow, which is resolved at its end.
EmitToolCall
Forward the held items of the call that just ended, then its end
carrying call (the call as validated, with a repaired name).
InvalidToolCall(StreamedInvalidToolCall)
The model emitted an unknown or disallowed tool call. Resolve it via
AgentRun::resolve_streamed_invalid_tool_call, then apply the
outcome with StreamedTurnAssembler::resolve_pending_invalid.
Trait Implementations§
Source§impl Clone for StreamedTurnEvent
impl Clone for StreamedTurnEvent
Source§impl Debug for StreamedTurnEvent
impl Debug for StreamedTurnEvent
Source§impl<'de> Deserialize<'de> for StreamedTurnEvent
impl<'de> Deserialize<'de> for StreamedTurnEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StreamedTurnEvent
impl RefUnwindSafe for StreamedTurnEvent
impl Send for StreamedTurnEvent
impl Sync for StreamedTurnEvent
impl Unpin for StreamedTurnEvent
impl UnsafeUnpin for StreamedTurnEvent
impl UnwindSafe for StreamedTurnEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.