pub struct RequestLimits {
pub evaluation: RateLimiter,
pub failed_auth: RateLimiter,
}Expand description
Shared transport budgets with an independent failed-authentication allowance.
Fields§
§evaluation: RateLimiterBudget for authenticated or anonymous API work.
failed_auth: RateLimiterBudget charged only when credentials fail verification.
Implementations§
Source§impl RequestLimits
impl RequestLimits
Sourcepub fn new(config: RateLimitConfig) -> Self
pub fn new(config: RateLimitConfig) -> Self
Construct independent budgets with the same configured limit and window.
Trait Implementations§
Source§impl Clone for RequestLimits
impl Clone for RequestLimits
Source§impl Debug for RequestLimits
impl Debug for RequestLimits
Source§impl Default for RequestLimits
impl Default for RequestLimits
Source§impl From<RateLimiter> for RequestLimits
impl From<RateLimiter> for RequestLimits
Source§fn from(evaluation: RateLimiter) -> Self
fn from(evaluation: RateLimiter) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestLimits
impl RefUnwindSafe for RequestLimits
impl Send for RequestLimits
impl Sync for RequestLimits
impl Unpin for RequestLimits
impl UnsafeUnpin for RequestLimits
impl UnwindSafe for RequestLimits
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request