pub struct MiddlewareManager { /* private fields */ }Implementations§
Source§impl MiddlewareManager
impl MiddlewareManager
pub fn new() -> Self
pub async fn intercept_llm_out( &self, ai_message: &mut AssistantMessage, ) -> AgentResult<MiddlewareFlow>
pub async fn intercept_tool_call( &self, tool_call: &mut ToolCall, ) -> AgentResult<MiddlewareFlow>
pub async fn intercept_tool_result( &self, tool_name: &str, result: &mut ToolCallResult, ) -> AgentResult<MiddlewareFlow>
pub fn add_llm_out<M: LlmOutMiddleware + 'static>(&mut self, middleware: M)
pub fn add_tool_call<M: ToolCallMiddleware + 'static>(&mut self, middleware: M)
pub fn add_tool_result<M: ToolResultMiddleware + 'static>( &mut self, middleware: M, )
pub fn add_middleware(&mut self, middleware: impl Into<Middleware>)
Trait Implementations§
Source§impl Default for MiddlewareManager
impl Default for MiddlewareManager
Source§fn default() -> MiddlewareManager
fn default() -> MiddlewareManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for MiddlewareManager
impl !UnwindSafe for MiddlewareManager
impl Freeze for MiddlewareManager
impl Send for MiddlewareManager
impl Sync for MiddlewareManager
impl Unpin for MiddlewareManager
impl UnsafeUnpin for MiddlewareManager
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