pub struct UserToolWrapper { /* private fields */ }Expand description
Wrapper that makes UserToolValue implement the Tool trait
Implementations§
Source§impl UserToolWrapper
impl UserToolWrapper
Sourcepub fn new(tool: UserToolValue, env: Arc<Environment>) -> Self
pub fn new(tool: UserToolValue, env: Arc<Environment>) -> Self
Create a new UserToolWrapper
Trait Implementations§
Source§impl Tool for UserToolWrapper
impl Tool for UserToolWrapper
fn name(&self) -> &str
fn description(&self) -> &str
fn parameters_schema(&self) -> JsonValue
fn execute<'life0, 'async_trait>(
&'life0 self,
args: JsonValue,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn to_definition(&self) -> ToolDefinition
Auto Trait Implementations§
impl Freeze for UserToolWrapper
impl RefUnwindSafe for UserToolWrapper
impl Send for UserToolWrapper
impl Sync for UserToolWrapper
impl Unpin for UserToolWrapper
impl UnwindSafe for UserToolWrapper
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