pub struct ScheduleTool;Expand description
Unified scheduling tool that wraps cron operations and supports natural-language schedule expressions. Actions:
create— create a new scheduled task (requiresid,schedule,command)list— list all scheduled tasksupdate— update schedule or command for a task (requiresid)remove— remove a task (requiresid)pause— disable a task (requiresid)resume— re-enable a task (requiresid)parse— parse a natural-language expression to cron (requiresschedule)
Trait Implementations§
Source§impl Clone for ScheduleTool
impl Clone for ScheduleTool
Source§fn clone(&self) -> ScheduleTool
fn clone(&self) -> ScheduleTool
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 ScheduleTool
impl Debug for ScheduleTool
Source§impl Default for ScheduleTool
impl Default for ScheduleTool
Source§fn default() -> ScheduleTool
fn default() -> ScheduleTool
Returns the “default value” for a type. Read more
Source§impl Tool for ScheduleTool
impl Tool for ScheduleTool
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what this tool does.
Used in system prompts so the LLM knows when to invoke this tool.
Source§fn input_schema(&self) -> Option<Value>
fn input_schema(&self) -> Option<Value>
JSON Schema describing the expected input parameters.
Returns
None if the tool accepts free-form text input. Read moreSource§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + 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,
input: &'life1 str,
ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the tool with the given input and context.
impl Copy for ScheduleTool
Auto Trait Implementations§
impl Freeze for ScheduleTool
impl RefUnwindSafe for ScheduleTool
impl Send for ScheduleTool
impl Sync for ScheduleTool
impl Unpin for ScheduleTool
impl UnsafeUnpin for ScheduleTool
impl UnwindSafe for ScheduleTool
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