pub struct RateLimitHandler { /* private fields */ }👎Deprecated since 0.10.2:
Use retry_api facade instead; scheduled for removal in 0.11
Expand description
Rate limit handler
Implementations§
Source§impl RateLimitHandler
impl RateLimitHandler
Sourcepub fn new(config: RateLimitConfig) -> Self
👎Deprecated since 0.10.2: Use retry_api facade instead; scheduled for removal in 0.11
pub fn new(config: RateLimitConfig) -> Self
Use retry_api facade instead; scheduled for removal in 0.11
Create a new rate limit handler
Sourcepub async fn handle_rate_limit(
&mut self,
error: &LlmError,
) -> Result<(), LlmError>
👎Deprecated since 0.10.2: Use retry_api facade instead; scheduled for removal in 0.11
pub async fn handle_rate_limit( &mut self, error: &LlmError, ) -> Result<(), LlmError>
Use retry_api facade instead; scheduled for removal in 0.11
Handle rate limit response
Sourcepub const fn reset_on_success(&mut self)
👎Deprecated since 0.10.2: Use retry_api facade instead; scheduled for removal in 0.11
pub const fn reset_on_success(&mut self)
Use retry_api facade instead; scheduled for removal in 0.11
Reset rate limit state on successful request
Trait Implementations§
Source§impl Clone for RateLimitHandler
impl Clone for RateLimitHandler
Source§fn clone(&self) -> RateLimitHandler
fn clone(&self) -> RateLimitHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RateLimitHandler
impl RefUnwindSafe for RateLimitHandler
impl Send for RateLimitHandler
impl Sync for RateLimitHandler
impl Unpin for RateLimitHandler
impl UnsafeUnpin for RateLimitHandler
impl UnwindSafe for RateLimitHandler
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