pub struct ToolCallSlot {
pub id: String,
pub name: String,
pub signature: Option<String>,
pub additional_params: Option<Value>,
pub saw_arguments_delta: bool,
pub announce_arguments: Option<Value>,
/* private fields */
}Expand description
Wire identity of a tool call whose input is streaming, as tracked by an adapter. The slot keeps only what the wire keys by — an index — mapped to the identity the adapter established for that call.
Fields§
§id: StringEstablished provider id: updated when a later chunk carries one. Empty until the wire supplies one.
name: StringEstablished tool name: the last non-empty value seen.
signature: Option<String>Provider-specific decoration carried onto the call’s end event.
additional_params: Option<Value>Provider-specific decoration carried onto the call’s end event.
saw_arguments_delta: boolWhether any raw argument fragment streamed for this slot. The done item’s unparseable restatement re-emits its raw bytes only when NO fragment preceded it — the buffer already holds streamed bytes, and re-emitting the restatement doubled them.
announce_arguments: Option<Value>The payload the wire announced when it opened the call (Gemini
Interactions step.start usually carries "arguments": {}, and
sometimes the whole payload). Replace-if-no-deltas, never
concatenated: fragments, when they arrive, ARE the arguments and
the announce is ignored; only a slot that fragmented nothing falls
back to what it announced.
Implementations§
Source§impl ToolCallSlot
impl ToolCallSlot
Sourcepub fn key(&self) -> &StreamPartId
pub fn key(&self) -> &StreamPartId
The assembly id this call’s fragments are emitted under.
Sourcepub fn observe_arguments_delta(&mut self, arguments: &str)
pub fn observe_arguments_delta(&mut self, arguments: &str)
Record a raw argument fragment before it is forwarded to the shared accumulator.
Sourcepub fn has_substantive_arguments(&self) -> bool
pub fn has_substantive_arguments(&self) -> bool
Whether the wire supplied enough argument bytes to distinguish this slot from a call cut off before its first argument token.
Sourcepub fn end_event(&self, on_unparseable: UnparseableToolInput) -> ToolInputEnd
pub fn end_event(&self, on_unparseable: UnparseableToolInput) -> ToolInputEnd
Build the end event that closes this call’s assembly in the shared accumulator, carrying the established provider id and any decoration.
Trait Implementations§
Source§impl Clone for ToolCallSlot
impl Clone for ToolCallSlot
Source§fn clone(&self) -> ToolCallSlot
fn clone(&self) -> ToolCallSlot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ToolCallSlot
impl RefUnwindSafe for ToolCallSlot
impl Send for ToolCallSlot
impl Sync for ToolCallSlot
impl Unpin for ToolCallSlot
impl UnsafeUnpin for ToolCallSlot
impl UnwindSafe for ToolCallSlot
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
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<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more