pub struct ToolRegistryBuilder { /* private fields */ }Implementations§
Source§impl ToolRegistryBuilder
impl ToolRegistryBuilder
pub fn tool(self, tool: ToolImpl) -> Self
pub fn tool_fn( self, def: ToolDef, exec: impl Fn(&ToolArgs) -> Result<String, String> + Send + Sync + 'static, ) -> Self
pub fn async_tool_fn<F, Fut>(self, def: ToolDef, exec: F) -> Self
pub fn policy( self, policy: impl Fn(&ToolCall<'_>) -> ToolCallDecision + Send + Sync + 'static, ) -> Self
pub fn sanitize_errors(self, sanitize: bool) -> Self
pub fn build(&self) -> ToolRegistry
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ToolRegistryBuilder
impl !UnwindSafe for ToolRegistryBuilder
impl Freeze for ToolRegistryBuilder
impl Send for ToolRegistryBuilder
impl Sync for ToolRegistryBuilder
impl Unpin for ToolRegistryBuilder
impl UnsafeUnpin for ToolRegistryBuilder
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