Struct LoadShed
pub struct LoadShed<S> { /* private fields */ }
A Service that sheds load when the inner service isn't ready.
Implementations
impl<S> LoadShed<S>
const fn new(inner: S) -> SelfWraps a service in
LoadShedmiddleware.
Trait Implementations
impl<S, Req> Service<Req> for LoadShed<S>
where
S: Service<Req>,
S::Error: Into<BoxError>,
type Response = <S as Service<Req>>::Response;type Error = Box<dyn Error + Sync + Send>;type Future = ResponseFuture<<S as Service<Req>>::Future>;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn call(&mut self, req: Req) -> Self::Future
impl<S: Clone> Clone for LoadShed<S>
fn clone(&self) -> Self
impl<S: Debug> Debug for LoadShed<S>
fn fmt(&self, f: &mut Formatter<'_>) -> Result