pub struct ExplainedTool<T: RichTool> { /* private fields */ }Expand description
Middleware enforcing an ExplainabilityPolicy on any RichTool.
Wraps without touching the inner tool’s constructor (cf. WalledTool).
Implementations§
Source§impl<T: RichTool> ExplainedTool<T>
impl<T: RichTool> ExplainedTool<T>
pub fn new(inner: T, policy: ExplainabilityPolicy) -> Self
Trait Implementations§
Source§impl<T: RichTool> RichTool for ExplainedTool<T>
impl<T: RichTool> RichTool for ExplainedTool<T>
fn descriptor(&self) -> &ToolDescriptor
fn invoke_rich<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 InvokeCtx,
) -> Pin<Box<dyn Future<Output = Result<ToolReturn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<T> Freeze for ExplainedTool<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExplainedTool<T>where
T: RefUnwindSafe,
impl<T> Send for ExplainedTool<T>
impl<T> Sync for ExplainedTool<T>
impl<T> Unpin for ExplainedTool<T>where
T: Unpin,
impl<T> UnsafeUnpin for ExplainedTool<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ExplainedTool<T>where
T: UnwindSafe,
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