pub enum ToolFn {
Async(Box<dyn Fn(&[String]) -> BoxFuture<'static, Result<String, ToolError>> + Send + Sync>),
}
Expand description
Represents the wrapped function of a tool, always async.
The Async
variant holds a boxed async function that takes string arguments and returns a Result<String, ToolError>
.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolFn
impl !RefUnwindSafe for ToolFn
impl Send for ToolFn
impl Sync for ToolFn
impl Unpin for ToolFn
impl !UnwindSafe for ToolFn
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