Struct LoadShed

struct LoadShed<S> { ... }

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

Implementations

impl<S> LoadShed<S>

const fn new(inner: S) -> Self

Wraps a service in LoadShed middleware.

impl<M, S, Target, Request> MakeService for LoadShed<S>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
fn make_service(self: &mut Self, target: Target) -> <M as MakeService<Target, Request>>::Future

impl<S> Freeze for LoadShed<S>

impl<S> RefUnwindSafe for LoadShed<S>

impl<S> Send for LoadShed<S>

impl<S> Sync for LoadShed<S>

impl<S> Unpin for LoadShed<S>

impl<S> UnwindSafe for LoadShed<S>

impl<S, Req> Service for LoadShed<S>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
fn call(self: &mut Self, req: Req) -> <Self as >::Future

impl<S: $crate::fmt::Debug> Debug for LoadShed<S>

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl<S: Clone> Clone for LoadShed<S>

fn clone(self: &Self) -> Self

impl<T> Any for LoadShed<S>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for LoadShed<S>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for LoadShed<S>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for LoadShed<S>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for LoadShed<S>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for LoadShed<S>

impl<T> ToOwned for LoadShed<S>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for LoadShed<S>

impl<T, Request> ServiceExt for LoadShed<S>

impl<T, U> Into for LoadShed<S>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for LoadShed<S>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for LoadShed<S>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>