pub struct TaskCancelTool { /* private fields */ }Expand description
Cancel a running background task and any descendant tasks.
Implementations§
Source§impl TaskCancelTool
impl TaskCancelTool
pub fn new(manager: Arc<BackgroundTaskManager>) -> Self
pub fn with_task_store(self, task_store: Option<Arc<TaskStore>>) -> Self
Trait Implementations§
Source§impl Clone for TaskCancelTool
impl Clone for TaskCancelTool
Source§fn clone(&self) -> TaskCancelTool
fn clone(&self) -> TaskCancelTool
Returns a duplicate of the value. Read more
1.0.0 · 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 TaskCancelTool
impl Debug for TaskCancelTool
Source§impl TypedTool for TaskCancelTool
impl TypedTool for TaskCancelTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Tool description shown to the LLM.
Source§fn validate(&self, args: &Self::Args) -> Result<(), String>
fn validate(&self, args: &Self::Args) -> Result<(), String>
Optional business-logic validation after deserialization. Read more
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: TaskCancelArgs,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: TaskCancelArgs,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute with typed arguments.
Source§fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Self::Args,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Self::Args,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Execute with typed arguments and return structured effects. Read more
Auto Trait Implementations§
impl Freeze for TaskCancelTool
impl !RefUnwindSafe for TaskCancelTool
impl Send for TaskCancelTool
impl Sync for TaskCancelTool
impl Unpin for TaskCancelTool
impl !UnwindSafe for TaskCancelTool
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tool for Twhere
T: TypedTool,
impl<T> Tool for Twhere
T: TypedTool,
Source§fn validate_args(&self, _args: &Value) -> Result<(), ToolError>
fn validate_args(&self, _args: &Value) -> Result<(), ToolError>
Skips JSON Schema validation — from_value deserialization covers it.
Source§fn descriptor(&self) -> ToolDescriptor
fn descriptor(&self) -> ToolDescriptor
Get the tool descriptor.
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Execute the tool. Read more
Source§fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Execute tool and return structured effects. Read more