pub struct RawToolDef {
pub name: String,
pub description: String,
pub parameters: Value,
pub meta: Value,
pub func: Box<dyn Fn(Value) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send>> + Send + Sync>,
}Expand description
A tool definition produced by an FFI adapter’s load() function.
name and description are owned Strings here; they are leaked
to &'static str at registration time so that
register_raw’s signature
stays unchanged.
Fields§
§name: String§description: String§parameters: Value§meta: Value§func: Box<dyn Fn(Value) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send>> + Send + Sync>Auto Trait Implementations§
impl Freeze for RawToolDef
impl !RefUnwindSafe for RawToolDef
impl Send for RawToolDef
impl Sync for RawToolDef
impl Unpin for RawToolDef
impl UnsafeUnpin for RawToolDef
impl !UnwindSafe for RawToolDef
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