pub struct RateLimitMiddleware { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AgentMiddleware for RateLimitMiddleware
impl AgentMiddleware for RateLimitMiddleware
fn before_model_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch: &'life1 mut ExecuteBatch,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_model_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_result: &'life1 mut TurnResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_args: &'life2 mut Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_result: &'life2 mut Result<Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
_result: &'life1 mut TurnResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn dynamic_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dynamic_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
If
Some, replaces the rendered system prompt for this turn.Auto Trait Implementations§
impl !Freeze for RateLimitMiddleware
impl !RefUnwindSafe for RateLimitMiddleware
impl Send for RateLimitMiddleware
impl Sync for RateLimitMiddleware
impl Unpin for RateLimitMiddleware
impl UnsafeUnpin for RateLimitMiddleware
impl UnwindSafe for RateLimitMiddleware
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