pub struct RateLimitOptions {
pub enabled: Option<bool>,
pub window: u64,
pub max: u64,
pub storage: RateLimitStorageOption,
pub custom_rules: Vec<RateLimitPathRule>,
pub dynamic_rules: Vec<DynamicRateLimitPathRule>,
pub custom_storage: Option<Arc<dyn RateLimitStorage>>,
}Expand description
Rate limiting defaults.
Fields§
§enabled: Option<bool>§window: u64§max: u64§storage: RateLimitStorageOption§custom_rules: Vec<RateLimitPathRule>§dynamic_rules: Vec<DynamicRateLimitPathRule>§custom_storage: Option<Arc<dyn RateLimitStorage>>Trait Implementations§
Source§impl Clone for RateLimitOptions
impl Clone for RateLimitOptions
Source§fn clone(&self) -> RateLimitOptions
fn clone(&self) -> RateLimitOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RateLimitOptions
impl Debug for RateLimitOptions
Auto Trait Implementations§
impl Freeze for RateLimitOptions
impl !RefUnwindSafe for RateLimitOptions
impl Send for RateLimitOptions
impl Sync for RateLimitOptions
impl Unpin for RateLimitOptions
impl UnsafeUnpin for RateLimitOptions
impl !UnwindSafe for RateLimitOptions
Blanket Implementations§
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