pub struct RateLimiter { /* private fields */ }Expand description
Rate limiter configuration (legacy, use SharedRateLimiter for parallel sync)
Implementations§
Source§impl RateLimiter
impl RateLimiter
Sourcepub fn on_success(&mut self)
pub fn on_success(&mut self)
Handle a successful request
Sourcepub fn on_rate_limit(&mut self)
pub fn on_rate_limit(&mut self)
Handle a rate limit (HTTP 429) response
Sourcepub fn should_pause(&self) -> bool
pub fn should_pause(&self) -> bool
Check if we should pause sync due to repeated rate limits
Sourcepub fn current_backoff(&self) -> Duration
pub fn current_backoff(&self) -> Duration
Get the current backoff duration
Sourcepub fn pause_duration(&self) -> Duration
pub fn pause_duration(&self) -> Duration
Get pause duration (30 minutes after 5 consecutive 429s)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RateLimiter
impl RefUnwindSafe for RateLimiter
impl Send for RateLimiter
impl Sync for RateLimiter
impl Unpin for RateLimiter
impl UnsafeUnpin for RateLimiter
impl UnwindSafe for RateLimiter
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