pub struct ToolRegistration {
pub name: &'static str,
pub doc: &'static str,
pub f: fn(Value) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send>>,
pub param_schema: fn() -> Value,
pub meta_json: &'static str,
}Expand description
Tool registration for inventory collection. Constructed via struct literal in macro-generated code; field additions are minor-version breaking changes.
Fields§
§name: &'static str§doc: &'static str§f: fn(Value) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send>>§param_schema: fn() -> Value§meta_json: &'static strJSON object literal of the attributes declared in #[tool(...)].
"{}" when no attributes were given. Deserialized into the
collection’s M at ToolCollection::collect_tools time.
Trait Implementations§
impl Collect for ToolRegistration
Auto Trait Implementations§
impl Freeze for ToolRegistration
impl RefUnwindSafe for ToolRegistration
impl Send for ToolRegistration
impl Sync for ToolRegistration
impl Unpin for ToolRegistration
impl UnsafeUnpin for ToolRegistration
impl UnwindSafe for ToolRegistration
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