pub trait ToolFn:
for<'a> Fn(HashMap<String, Value>, &'a ToolContext<'a>) -> MaybeSendBoxFuture<'a, ToolResult>
+ MaybeSend
+ MaybeSync { }Expand description
Trait combining the necessary bounds for a tool function.
This is a workaround for Rust compiler error E0225, which prevents using
non-auto traits like MaybeSend in a dyn trait object with Fn.
Users typically don’t need to implement this directly; any closure matching
the signature automatically implements it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".