Struct RateLimitLayer

struct RateLimitLayer { ... }

Enforces a rate limit on the number of requests the underlying service can handle over a period of time.

Implementations

impl RateLimitLayer

const fn new(num: u64, per: Duration) -> Self

Create new rate limit layer.

impl Clone for RateLimitLayer

fn clone(self: &Self) -> RateLimitLayer

impl Debug for RateLimitLayer

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

impl Freeze for RateLimitLayer

impl RefUnwindSafe for RateLimitLayer

impl Send for RateLimitLayer

impl Sync for RateLimitLayer

impl Unpin for RateLimitLayer

impl UnsafeUnpin for RateLimitLayer

impl UnwindSafe for RateLimitLayer

impl<S> Layer for RateLimitLayer

fn layer(self: &Self, service: S) -> <Self as >::Service

impl<T> Any for RateLimitLayer

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for RateLimitLayer

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

impl<T> BorrowMut for RateLimitLayer

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

impl<T> CloneToUninit for RateLimitLayer

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

impl<T> From for RateLimitLayer

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for RateLimitLayer

impl<T> ToOwned for RateLimitLayer

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

impl<T> WithSubscriber for RateLimitLayer

impl<T, U> Into for RateLimitLayer

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 RateLimitLayer

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

impl<T, U> TryInto for RateLimitLayer

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