pub struct RateLimiter { /* private fields */ }Implementations§
Source§impl RateLimiter
impl RateLimiter
pub fn new() -> Self
pub fn check_rate_limit(&mut self) -> Result<(), RoverApiError>
pub fn update_from_headers(&mut self, response: &Response)
pub fn get_status(&self) -> RateLimitStatus
Sourcepub async fn wait_for_reset(&self)
pub async fn wait_for_reset(&self)
Wait until rate limits are reset
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