pub struct ToolHandler { /* private fields */ }Expand description
Opaque resumable handler for one selected executable tool.
One handler owns one invocation. Start with Invoke, resume only the current
interaction with its exact id, and use Cancel for cancellation. A completed
result is terminal; a model-visible failure is a completed result with is_error.
Import ToolHandlerBackend to call behavior on the supplied handle.
See crate::local::ToolRegistration for a complete example.
Trait Implementations§
Source§impl Debug for ToolHandler
impl Debug for ToolHandler
Source§impl ToolHandlerBackend for ToolHandler
impl ToolHandlerBackend for ToolHandler
Source§fn step(
&mut self,
input: ToolHandlerInput,
) -> impl Future<Output = Result<ToolHandlerOutput, ToolError>> + Send + '_
fn step( &mut self, input: ToolHandlerInput, ) -> impl Future<Output = Result<ToolHandlerOutput, ToolError>> + Send + '_
Advances the unique handler with an invocation, interaction response,
or cancellation request. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ToolHandler
impl !Sync for ToolHandler
impl !UnwindSafe for ToolHandler
impl Freeze for ToolHandler
impl Send for ToolHandler
impl Unpin for ToolHandler
impl UnsafeUnpin for ToolHandler
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