pub struct StubTools;Expand description
Placeholder executor: advertises no tools and reports any call it receives as unhandled (the model shouldn’t call anything without specs, but the guard keeps the loop progressing if it does).
Trait Implementations§
impl Copy for StubTools
Source§impl ToolExecutor for StubTools
impl ToolExecutor for StubTools
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
args_json: &'life2 str,
) -> Pin<Box<dyn Future<Output = String> + 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,
name: &'life1 str,
args_json: &'life2 str,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run
name with JSON args_json; return a JSON result.Source§fn specs(&self) -> Vec<ToolSpec>
fn specs(&self) -> Vec<ToolSpec>
Specs for the tools this executor knows how to run. The default
returns an empty list — the model won’t be told about any tools, so it
won’t emit
tool_calls. Real registries override this.Source§fn owns(&self, name: &str) -> bool
fn owns(&self, name: &str) -> bool
Whether this executor advertises a tool named
name. Read moreSource§fn needs_approval(&self, _name: &str) -> bool
fn needs_approval(&self, _name: &str) -> bool
Whether
name requires explicit human approval before Self::execute
may run. The default is false — pure / read-only tools shouldn’t
trigger an approval gate. Override for sensitive tools (writes, code
execution, network reach, anything with side effects). Read moreAuto Trait Implementations§
impl Freeze for StubTools
impl RefUnwindSafe for StubTools
impl Send for StubTools
impl Sync for StubTools
impl Unpin for StubTools
impl UnsafeUnpin for StubTools
impl UnwindSafe for StubTools
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