Struct apalis_core::layers::limit::RateLimitLayer
source · pub struct RateLimitLayer { /* private fields */ }Available on crate feature
limit only.Expand description
Enforces a rate limit on the number of requests the underlying service can handle over a period of time.
Implementations§
source§impl RateLimitLayer
impl RateLimitLayer
sourcepub fn new(num: u64, per: Duration) -> RateLimitLayer
pub fn new(num: u64, per: Duration) -> RateLimitLayer
Create new rate limit layer.
Trait Implementations§
source§impl Clone for RateLimitLayer
impl Clone for RateLimitLayer
source§fn clone(&self) -> RateLimitLayer
fn clone(&self) -> RateLimitLayer
Returns a copy 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 Debug for RateLimitLayer
impl Debug for RateLimitLayer
source§impl<S> Layer<S> for RateLimitLayer
impl<S> Layer<S> for RateLimitLayer
Auto Trait Implementations§
impl RefUnwindSafe for RateLimitLayer
impl Send for RateLimitLayer
impl Sync for RateLimitLayer
impl Unpin for RateLimitLayer
impl UnwindSafe for RateLimitLayer
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