Struct burger::concurrency_limit::ConcurrencyLimit
source · pub struct ConcurrencyLimit<S> { /* private fields */ }
Expand description
A wrapper for the ServiceExt::concurrency_limit
combinator.
See the module for more information.
Trait Implementations§
source§impl<S: Debug> Debug for ConcurrencyLimit<S>
impl<S: Debug> Debug for ConcurrencyLimit<S>
source§impl<S> Load for ConcurrencyLimit<S>where
S: Load,
impl<S> Load for ConcurrencyLimit<S>where
S: Load,
source§impl<S, T> Middleware<S> for ConcurrencyLimit<T>where
T: Middleware<S>,
impl<S, T> Middleware<S> for ConcurrencyLimit<T>where
T: Middleware<S>,
§type Service = ConcurrencyLimit<<T as Middleware<S>>::Service>
type Service = ConcurrencyLimit<<T as Middleware<S>>::Service>
The resultant service.
source§impl<Request, S> Service<Request> for ConcurrencyLimit<S>where
S: Service<Request>,
impl<Request, S> Service<Request> for ConcurrencyLimit<S>where
S: Service<Request>,
§type Permit<'a> = ConcurrencyLimitPermit<'a, S, Request>
where
S: 'a
type Permit<'a> = ConcurrencyLimitPermit<'a, S, Request> where S: 'a
The type of the permit required to call the service.
Auto Trait Implementations§
impl<S> !Freeze for ConcurrencyLimit<S>
impl<S> !RefUnwindSafe for ConcurrencyLimit<S>
impl<S> Send for ConcurrencyLimit<S>where
S: Send,
impl<S> Sync for ConcurrencyLimit<S>where
S: Sync,
impl<S> Unpin for ConcurrencyLimit<S>where
S: Unpin,
impl<S> UnwindSafe for ConcurrencyLimit<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
.