Struct tower::load_shed::LoadShed[][src]

pub struct LoadShed<S> { /* fields omitted */ }
This is supported on crate feature load-shed only.

A Service that sheds load when the inner service isn’t ready.


impl<S> LoadShed<S>[src]

pub fn new(inner: S) -> Self[src]

Wraps a service in LoadShed middleware.

Trait Implementations

impl<S: Clone> Clone for LoadShed<S>[src]

impl<S: Debug> Debug for LoadShed<S>[src]

impl<S, Req> Service<Req> for LoadShed<S> where
    S: Service<Req>,
    S::Error: Into<BoxError>, 

type Response = S::Response

Responses given by the service.

type Error = BoxError

Errors produced by the service.

type Future = ResponseFuture<S::Future>

The future response value.

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,