pub struct ToolExecutor { /* private fields */ }Implementations§
Source§impl ToolExecutor
impl ToolExecutor
pub fn new(registry: Arc<ToolRegistry>) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn allow_dangerous_without_confirmation(self) -> Self
pub async fn execute( &self, ctx: &Context, name: &str, input: Value, ) -> Result<ToolOutput>
pub async fn execute_call( &self, ctx: &Context, call: &mut ToolCall, ) -> Result<ToolOutput>
pub fn registry(&self) -> &ToolRegistry
pub fn is_dangerous(&self, name: &str) -> bool
pub fn needs_confirmation(&self, name: &str) -> bool
Auto Trait Implementations§
impl Freeze for ToolExecutor
impl !RefUnwindSafe for ToolExecutor
impl Send for ToolExecutor
impl Sync for ToolExecutor
impl Unpin for ToolExecutor
impl !UnwindSafe for ToolExecutor
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