pub struct RateLimitContext {
pub enabled: bool,
pub window: u64,
pub max: u64,
pub storage: RateLimitStorageOption,
pub custom_rules: Vec<RateLimitPathRule>,
pub dynamic_rules: Vec<DynamicRateLimitPathRule>,
pub plugin_rules: Vec<PluginRateLimitRule>,
pub custom_store: Option<Arc<dyn RateLimitStore>>,
pub hybrid: HybridRateLimitOptions,
pub memory_cleanup_interval: Option<Duration>,
pub memory_store: Arc<GovernorMemoryRateLimitStore>,
}Fields§
§enabled: bool§window: u64§max: u64§storage: RateLimitStorageOption§custom_rules: Vec<RateLimitPathRule>§dynamic_rules: Vec<DynamicRateLimitPathRule>§plugin_rules: Vec<PluginRateLimitRule>§custom_store: Option<Arc<dyn RateLimitStore>>§hybrid: HybridRateLimitOptions§memory_cleanup_interval: Option<Duration>§memory_store: Arc<GovernorMemoryRateLimitStore>Trait Implementations§
Source§impl Clone for RateLimitContext
impl Clone for RateLimitContext
Source§fn clone(&self) -> RateLimitContext
fn clone(&self) -> RateLimitContext
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 moreAuto Trait Implementations§
impl Freeze for RateLimitContext
impl !RefUnwindSafe for RateLimitContext
impl Send for RateLimitContext
impl Sync for RateLimitContext
impl Unpin for RateLimitContext
impl UnsafeUnpin for RateLimitContext
impl !UnwindSafe for RateLimitContext
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