pub struct LoadShed<S> { /* private fields */ }
Expand description
A wrapper Service
for the ServiceExt::load_shed
combinator.
See the module for more information.
Trait Implementations§
source§impl<S, T> Middleware<S> for LoadShed<T>where
T: Middleware<S>,
impl<S, T> Middleware<S> for LoadShed<T>where
T: Middleware<S>,
source§impl<Request, S> Service<Request> for LoadShed<S>where
S: Service<Request>,
impl<Request, S> Service<Request> for LoadShed<S>where
S: Service<Request>,
Auto Trait Implementations§
impl<S> Freeze for LoadShed<S>where
S: Freeze,
impl<S> RefUnwindSafe for LoadShed<S>where
S: RefUnwindSafe,
impl<S> Send for LoadShed<S>where
S: Send,
impl<S> Sync for LoadShed<S>where
S: Sync,
impl<S> Unpin for LoadShed<S>where
S: Unpin,
impl<S> UnwindSafe for LoadShed<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
.