pub struct RateLimitLayer<L, K>where
L: LuaInterface,
K: KeyResolver,{ /* private fields */ }Expand description
Enforces rate limit on the underlying service.
Construct using RateLimitLayerBuilder::build, with the builder obtained from RateLimitLayer::builder.
Implementations§
Source§impl<L, K> RateLimitLayer<L, K>where
L: LuaInterface,
K: KeyResolver,
impl<L, K> RateLimitLayer<L, K>where
L: LuaInterface,
K: KeyResolver,
Sourcepub fn builder() -> RateLimitLayerBuilder<L, K, false, false, false, false>
pub fn builder() -> RateLimitLayerBuilder<L, K, false, false, false, false>
Returns a new builder for configuring the layer.
Trait Implementations§
Source§impl<L, K> Clone for RateLimitLayer<L, K>
impl<L, K> Clone for RateLimitLayer<L, K>
Source§fn clone(&self) -> RateLimitLayer<L, K>
fn clone(&self) -> RateLimitLayer<L, K>
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<L, K> Debug for RateLimitLayer<L, K>
impl<L, K> Debug for RateLimitLayer<L, K>
Source§impl<S, L, K> Layer<S> for RateLimitLayer<L, K>where
L: LuaInterface,
K: KeyResolver,
impl<S, L, K> Layer<S> for RateLimitLayer<L, K>where
L: LuaInterface,
K: KeyResolver,
Auto Trait Implementations§
impl<L, K> Freeze for RateLimitLayer<L, K>
impl<L, K> RefUnwindSafe for RateLimitLayer<L, K>where
L: RefUnwindSafe,
K: RefUnwindSafe,
impl<L, K> Send for RateLimitLayer<L, K>where
K: Send,
impl<L, K> Sync for RateLimitLayer<L, K>where
K: Sync,
impl<L, K> Unpin for RateLimitLayer<L, K>
impl<L, K> UnwindSafe for RateLimitLayer<L, K>where
L: UnwindSafe,
K: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more