pub struct InMemoryRateLimiter { /* private fields */ }Expand description
Per-process rate limit; each host is delayed based on local fetch times.
Trait Implementations§
Source§impl Clone for InMemoryRateLimiter
impl Clone for InMemoryRateLimiter
Source§fn clone(&self) -> InMemoryRateLimiter
fn clone(&self) -> InMemoryRateLimiter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InMemoryRateLimiter
impl Default for InMemoryRateLimiter
Source§fn default() -> InMemoryRateLimiter
fn default() -> InMemoryRateLimiter
Returns the “default value” for a type. Read more
Source§impl RateLimiter for InMemoryRateLimiter
impl RateLimiter for InMemoryRateLimiter
Source§fn wait_for_host<'life0, 'life1, 'async_trait>(
&'life0 self,
host: &'life1 str,
delay_ms: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_host<'life0, 'life1, 'async_trait>(
&'life0 self,
host: &'life1 str,
delay_ms: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Wait if needed so that at least
delay_ms has passed since the last fetch for this host.Auto Trait Implementations§
impl Freeze for InMemoryRateLimiter
impl !RefUnwindSafe for InMemoryRateLimiter
impl Send for InMemoryRateLimiter
impl Sync for InMemoryRateLimiter
impl Unpin for InMemoryRateLimiter
impl UnsafeUnpin for InMemoryRateLimiter
impl !UnwindSafe for InMemoryRateLimiter
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