Struct ConcurrencyLimitLayer
pub struct ConcurrencyLimitLayer { /* private fields */ }
Enforces a limit on the concurrent number of requests the underlying service can handle.
Implementations
impl ConcurrencyLimitLayer
const fn new(max: usize) -> SelfCreate a new concurrency limit layer.
Trait Implementations
impl Clone for ConcurrencyLimitLayer
fn clone(&self) -> ConcurrencyLimitLayer
impl Debug for ConcurrencyLimitLayer
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S> Layer<S> for ConcurrencyLimitLayer
type Service = ConcurrencyLimit<S>;fn layer(&self, service: S) -> Self::Service
Auto Trait Implementations
impl Freeze for ConcurrencyLimitLayer
impl RefUnwindSafe for ConcurrencyLimitLayer
impl Send for ConcurrencyLimitLayer
impl Sync for ConcurrencyLimitLayer
impl Unpin for ConcurrencyLimitLayer
impl UnsafeUnpin for ConcurrencyLimitLayer
impl UnwindSafe for ConcurrencyLimitLayer
Blanket Implementations
impl<T> Any for ConcurrencyLimitLayer
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ConcurrencyLimitLayer
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ConcurrencyLimitLayer
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for ConcurrencyLimitLayer
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for ConcurrencyLimitLayer
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for ConcurrencyLimitLayer
impl<T> ToOwned for ConcurrencyLimitLayer
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for ConcurrencyLimitLayer
impl<T, U> Into<U> for ConcurrencyLimitLayer
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for ConcurrencyLimitLayer
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for ConcurrencyLimitLayer
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>