pub struct RateLimit<S>where
S: RateLimitStore,{ /* private fields */ }Implementations§
Source§impl<S> RateLimit<S>where
S: RateLimitStore,
impl<S> RateLimit<S>where
S: RateLimitStore,
pub fn new(config: RateLimitConfig, store: S) -> Self
Trait Implementations§
Source§impl<S, B, ST> Transform<S, ServiceRequest> for RateLimit<ST>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S::Future: 'static,
B: 'static,
ST: RateLimitStore + 'static,
impl<S, B, ST> Transform<S, ServiceRequest> for RateLimit<ST>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S::Future: 'static,
B: 'static,
ST: RateLimitStore + 'static,
Source§type Response = ServiceResponse<EitherBody<B>>
type Response = ServiceResponse<EitherBody<B>>
Responses produced by the service.
Source§type Transform = RateLimitMiddleware<S>
type Transform = RateLimitMiddleware<S>
The
TransformService value created by this factorySource§type Future = Ready<Result<<RateLimit<ST> as Transform<S, ServiceRequest>>::Transform, <RateLimit<ST> as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<RateLimit<ST> as Transform<S, ServiceRequest>>::Transform, <RateLimit<ST> as Transform<S, ServiceRequest>>::InitError>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl<S> Freeze for RateLimit<S>
impl<S> RefUnwindSafe for RateLimit<S>where
S: RefUnwindSafe,
impl<S> Send for RateLimit<S>
impl<S> Sync for RateLimit<S>
impl<S> Unpin for RateLimit<S>
impl<S> UnsafeUnpin for RateLimit<S>
impl<S> UnwindSafe for RateLimit<S>where
S: RefUnwindSafe,
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