pub struct ToolEnforcementMiddleware { /* private fields */ }Implementations§
Source§impl ToolEnforcementMiddleware
impl ToolEnforcementMiddleware
pub fn new(config: ToolEnforcementConfig) -> Self
Trait Implementations§
Source§impl Middleware for ToolEnforcementMiddleware
impl Middleware for ToolEnforcementMiddleware
fn on_post_llm<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut PostLlmCtx,
) -> Pin<Box<dyn Future<Output = AgentResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_user_message<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 mut UserMessageCtx,
) -> Pin<Box<dyn Future<Output = AgentResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_pre_llm<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 mut PreLlmCtx,
) -> Pin<Box<dyn Future<Output = AgentResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for ToolEnforcementMiddleware
impl RefUnwindSafe for ToolEnforcementMiddleware
impl Send for ToolEnforcementMiddleware
impl Sync for ToolEnforcementMiddleware
impl Unpin for ToolEnforcementMiddleware
impl UnsafeUnpin for ToolEnforcementMiddleware
impl UnwindSafe for ToolEnforcementMiddleware
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