pub struct RegisteredTool {
pub schema: ToolSchema,
pub start: ToolFn,
}Fields§
§schema: ToolSchema§start: ToolFnImplementations§
Source§impl RegisteredTool
impl RegisteredTool
pub fn new( name: impl Into<CompactString>, description: impl Into<String>, parameters: Value, f: impl Fn(Value) -> BoxFuture<'static, Result<Box<dyn ToolSession>>> + Send + Sync + 'static, ) -> Self
pub fn text( name: impl Into<CompactString>, description: impl Into<String>, parameters: Value, f: impl Fn(Value) -> BoxFuture<'static, Result<String>> + Send + Sync + 'static, ) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for RegisteredTool
impl !UnwindSafe for RegisteredTool
impl Freeze for RegisteredTool
impl Send for RegisteredTool
impl Sync for RegisteredTool
impl Unpin for RegisteredTool
impl UnsafeUnpin for RegisteredTool
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