pub struct RateLimitConfig {
pub global_requests: usize,
pub per_host_requests: usize,
pub window: Duration,
pub max_tracked_hosts: usize,
}Expand description
Independently configurable request limits for a proxy generation.
Keeping this type in the admission module lets platform configuration map into it without making the limiter depend on the server or configuration modules.
Fields§
§global_requests: usize§per_host_requests: usize§window: Duration§max_tracked_hosts: usizeImplementations§
Source§impl RateLimitConfig
impl RateLimitConfig
pub fn validate(self) -> Result<Self, RateLimitConfigError>
Trait Implementations§
Source§impl Clone for RateLimitConfig
impl Clone for RateLimitConfig
impl Copy for RateLimitConfig
Source§impl Debug for RateLimitConfig
impl Debug for RateLimitConfig
Source§impl Default for RateLimitConfig
impl Default for RateLimitConfig
impl Eq for RateLimitConfig
Source§impl PartialEq for RateLimitConfig
impl PartialEq for RateLimitConfig
impl StructuralPartialEq for RateLimitConfig
Auto Trait Implementations§
impl Freeze for RateLimitConfig
impl RefUnwindSafe for RateLimitConfig
impl Send for RateLimitConfig
impl Sync for RateLimitConfig
impl Unpin for RateLimitConfig
impl UnsafeUnpin for RateLimitConfig
impl UnwindSafe for RateLimitConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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