pub struct ToolInvocation { /* private fields */ }Expand description
Untrusted complete tool invocation before registry validation.
Implementations§
Source§impl ToolInvocation
impl ToolInvocation
Sourcepub fn new(
tool_call_id: ToolCallId,
name: ToolName,
arguments: Value,
metadata: ProtocolMetadata,
) -> Result<Self, ToolInvocationError>
pub fn new( tool_call_id: ToolCallId, name: ToolName, arguments: Value, metadata: ProtocolMetadata, ) -> Result<Self, ToolInvocationError>
Creates a bounded invocation with object arguments.
§Errors
Returns an error for non-object, oversized, or deeply nested arguments.
Sourcepub const fn tool_call_id(&self) -> &ToolCallId
pub const fn tool_call_id(&self) -> &ToolCallId
Returns canonical tool-call ID.
Sourcepub const fn metadata(&self) -> &ProtocolMetadata
pub const fn metadata(&self) -> &ProtocolMetadata
Returns bounded invocation metadata.
Trait Implementations§
Source§impl Clone for ToolInvocation
impl Clone for ToolInvocation
Source§fn clone(&self) -> ToolInvocation
fn clone(&self) -> ToolInvocation
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 ToolInvocation
impl Debug for ToolInvocation
Source§impl PartialEq for ToolInvocation
impl PartialEq for ToolInvocation
impl StructuralPartialEq for ToolInvocation
Auto Trait Implementations§
impl Freeze for ToolInvocation
impl RefUnwindSafe for ToolInvocation
impl Send for ToolInvocation
impl Sync for ToolInvocation
impl Unpin for ToolInvocation
impl UnsafeUnpin for ToolInvocation
impl UnwindSafe for ToolInvocation
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