pub struct InvokeContext {
pub tool_call_id: String,
pub cancel: CancellationToken,
}Expand description
Per-invocation context handed to a tool’s Tool::execute.
Fields§
§tool_call_id: StringThe unique id of this invocation’s tool call.
cancel: CancellationTokenCooperative + deadline cancellation. Tools should select! on
cancel.cancelled() for long-running work. Clonable and 'static.
Auto Trait Implementations§
impl Freeze for InvokeContext
impl RefUnwindSafe for InvokeContext
impl Send for InvokeContext
impl Sync for InvokeContext
impl Unpin for InvokeContext
impl UnsafeUnpin for InvokeContext
impl UnwindSafe for InvokeContext
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