pub struct FnTool<I, O, F> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<I, O, F, Fut> Tool for FnTool<I, O, F>
impl<I, O, F, Fut> Tool for FnTool<I, O, F>
fn spec(&self) -> &ToolSpec
Source§fn timeout(&self) -> Option<Duration>
fn timeout(&self) -> Option<Duration>
Overrides the agent’s default tool timeout for this tool.
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Value,
ctx: &'life1 ToolCtx,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<I, O, F> Freeze for FnTool<I, O, F>
impl<I, O, F> RefUnwindSafe for FnTool<I, O, F>
impl<I, O, F> Send for FnTool<I, O, F>
impl<I, O, F> Sync for FnTool<I, O, F>
impl<I, O, F> Unpin for FnTool<I, O, F>
impl<I, O, F> UnsafeUnpin for FnTool<I, O, F>
impl<I, O, F> UnwindSafe for FnTool<I, O, F>
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