pub struct ToolSet { /* private fields */ }Expand description
A struct that holds a set of tools
Implementations§
source§impl ToolSet
impl ToolSet
pub fn new(tools: Vec<impl ToolDyn + 'static>) -> Self
pub fn builder() -> ToolSetBuilder
pub fn contains(&self, toolname: &str) -> bool
pub fn add_tool(&mut self, tool: impl ToolDyn + 'static)
pub fn add_tools(&mut self, toolset: ToolSet)
pub async fn call( &self, toolname: &str, args: String, ) -> Result<String, ToolSetError>
pub async fn documents(&self) -> Result<Vec<Document>, ToolSetError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolSet
impl !RefUnwindSafe for ToolSet
impl Send for ToolSet
impl Sync for ToolSet
impl Unpin for ToolSet
impl !UnwindSafe for ToolSet
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