pub struct TaskStatusTool { /* private fields */ }Expand description
Query background task status and result.
Supports querying a single task by task_id or listing all tasks.
Implementations§
Source§impl TaskStatusTool
impl TaskStatusTool
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 TaskStatusTool
impl Clone for TaskStatusTool
Source§fn clone(&self) -> TaskStatusTool
fn clone(&self) -> TaskStatusTool
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 TaskStatusTool
impl Debug for TaskStatusTool
Source§impl TypedTool for TaskStatusTool
impl TypedTool for TaskStatusTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Tool description shown to the LLM.
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: TaskStatusArgs,
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: TaskStatusArgs,
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 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_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 TaskStatusTool
impl !RefUnwindSafe for TaskStatusTool
impl Send for TaskStatusTool
impl Sync for TaskStatusTool
impl Unpin for TaskStatusTool
impl !UnwindSafe for TaskStatusTool
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