pub struct RateLimitProvider { /* private fields */ }Expand description
Rate limiting provider wrapper
Implementations§
Source§impl RateLimitProvider
impl RateLimitProvider
Sourcepub fn new(provider: Box<dyn LlmProvider>, config: RateLimitConfig) -> Self
pub fn new(provider: Box<dyn LlmProvider>, config: RateLimitConfig) -> Self
Create a new rate-limited provider
Sourcepub async fn get_stats(&self) -> RateLimitStats
pub async fn get_stats(&self) -> RateLimitStats
Get current rate limit statistics
Trait Implementations§
Source§impl LlmProvider for RateLimitProvider
impl LlmProvider for RateLimitProvider
Auto Trait Implementations§
impl Freeze for RateLimitProvider
impl !RefUnwindSafe for RateLimitProvider
impl Send for RateLimitProvider
impl Sync for RateLimitProvider
impl Unpin for RateLimitProvider
impl !UnwindSafe for RateLimitProvider
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