Struct burger::rate_limit::RateLimit
source · pub struct RateLimit<S> { /* private fields */ }
Expand description
A wrapper for the ServiceExt::rate_limit
combinator.
See the module for more information.
Trait Implementations§
Auto Trait Implementations§
impl<S> !Freeze for RateLimit<S>
impl<S> !RefUnwindSafe for RateLimit<S>
impl<S> Send for RateLimit<S>where
S: Send,
impl<S> Sync for RateLimit<S>where
S: Sync,
impl<S> Unpin for RateLimit<S>where
S: Unpin,
impl<S> UnwindSafe for RateLimit<S>where
S: 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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Request, S> ServiceExt<Request> for Swhere
S: Service<Request>,
impl<Request, S> ServiceExt<Request> for Swhere
S: Service<Request>,
source§fn concurrency_limit(self, n_permits: usize) -> ConcurrencyLimit<Self>where
Self: Sized,
fn concurrency_limit(self, n_permits: usize) -> ConcurrencyLimit<Self>where
Self: Sized,
Applies a concurrency limit to the service with a specified number of permits. Read more
source§fn load_shed(self) -> LoadShed<Self>where
Self: Sized,
fn load_shed(self) -> LoadShed<Self>where
Self: Sized,
Applies load shedding to the service. Read more
source§fn buffer(self, capacity: usize) -> Buffer<Self>where
Self: Sized,
fn buffer(self, capacity: usize) -> Buffer<Self>where
Self: Sized,
Applies buffering to the service with a specified capacity. Read more
source§fn rate_limit(self, interval: Duration, permits: usize) -> RateLimit<Self>where
Self: Sized,
fn rate_limit(self, interval: Duration, permits: usize) -> RateLimit<Self>where
Self: Sized,
Applies rate limiting to the service with a specified interval and number of permits. Read more
source§fn depressurize(self) -> Depressurize<Self>where
Self: Sized,
fn depressurize(self) -> Depressurize<Self>where
Self: Sized,
Depressurizes the service. Read more
source§fn pending_requests(self) -> PendingRequests<Self>where
Self: Sized,
fn pending_requests(self) -> PendingRequests<Self>where
Self: Sized,
source§fn leak<'t>(self: Arc<Self>) -> Leak<'t, Self>where
Self: Sized,
fn leak<'t>(self: Arc<Self>) -> Leak<'t, Self>where
Self: Sized,
Extends the lifetime of the permit. Read more
source§impl<Request, Ok, Error, S> TryService<Request> for S
impl<Request, Ok, Error, S> TryService<Request> for S
§type Ok = Ok
type Ok = Ok
The
Result::Ok
variant of the Service::Response
.§type Error = Error
type Error = Error
The
Result::Err
variant of the Service::Response
.