pub struct RateLimitLayer<K, S = (), P = u64, F = DefaultResponseFactory> { /* private fields */ }Expand description
Layer that applies RateLimit.
Implementations§
Source§impl<K> RateLimitLayer<K, (), u64, DefaultResponseFactory>
impl<K> RateLimitLayer<K, (), u64, DefaultResponseFactory>
Sourcepub fn builder(key_extractor: K) -> RateLimitBuilder<K>
pub fn builder(key_extractor: K) -> RateLimitBuilder<K>
Start a typed rate-limit layer builder.
Trait Implementations§
Source§impl<K: Clone, S: Clone, P: Clone, F: Clone> Clone for RateLimitLayer<K, S, P, F>
impl<K: Clone, S: Clone, P: Clone, F: Clone> Clone for RateLimitLayer<K, S, P, F>
Source§fn clone(&self) -> RateLimitLayer<K, S, P, F>
fn clone(&self) -> RateLimitLayer<K, S, P, F>
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 moreSource§impl<K, S, P, F, Inner> Layer<Inner> for RateLimitLayer<K, S, P, F>
impl<K, S, P, F, Inner> Layer<Inner> for RateLimitLayer<K, S, P, F>
Auto Trait Implementations§
impl<K, S = (), P = u64, F = DefaultResponseFactory> !RefUnwindSafe for RateLimitLayer<K, S, P, F>
impl<K, S = (), P = u64, F = DefaultResponseFactory> !UnwindSafe for RateLimitLayer<K, S, P, F>
impl<K, S, P, F> Freeze for RateLimitLayer<K, S, P, F>
impl<K, S, P, F> Send for RateLimitLayer<K, S, P, F>
impl<K, S, P, F> Sync for RateLimitLayer<K, S, P, F>
impl<K, S, P, F> Unpin for RateLimitLayer<K, S, P, F>
impl<K, S, P, F> UnsafeUnpin for RateLimitLayer<K, S, P, F>
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