pub struct ExtractedToolCall {
pub id: String,
pub name: String,
pub arguments: Value,
pub strategy: ExtractionStrategy,
}Expand description
A tool call recovered by ToolCallExtractor::extract, normalised across
every extraction strategy and already schema-validated.
Why: Downstream dispatch (tools::ToolRegistry::dispatch_gated) wants a
single shape regardless of which strategy produced the call.
What: id is the wire call ID for Native, or [FALLBACK_CALL_ID] for
any text-based strategy (documented there — those conventions carry no
ID). arguments is already a parsed, schema-valid Value.
Test: tests::extract_native_success and friends assert every field.
Fields§
§id: StringCall ID to echo back in the subsequent tool result message.
name: StringThe tool’s registered name.
arguments: ValueParsed, schema-validated argument object.
strategy: ExtractionStrategyWhich strategy recovered this call.
Trait Implementations§
Source§impl Clone for ExtractedToolCall
impl Clone for ExtractedToolCall
Source§fn clone(&self) -> ExtractedToolCall
fn clone(&self) -> ExtractedToolCall
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 moreSource§impl Debug for ExtractedToolCall
impl Debug for ExtractedToolCall
Source§impl PartialEq for ExtractedToolCall
impl PartialEq for ExtractedToolCall
Source§fn eq(&self, other: &ExtractedToolCall) -> bool
fn eq(&self, other: &ExtractedToolCall) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExtractedToolCall
Auto Trait Implementations§
impl Freeze for ExtractedToolCall
impl RefUnwindSafe for ExtractedToolCall
impl Send for ExtractedToolCall
impl Sync for ExtractedToolCall
impl Unpin for ExtractedToolCall
impl UnsafeUnpin for ExtractedToolCall
impl UnwindSafe for ExtractedToolCall
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,
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.