pub struct RateConfig {
pub requests_per_second: f64,
pub burst_capacity: f64,
pub warn_after: u32,
pub throttle_after: u32,
pub block_after: u32,
pub ban_after: u32,
pub ban_duration_secs: u64,
pub violation_decay_secs: u64,
}Fields§
§requests_per_second: f64§burst_capacity: f64§warn_after: u32§throttle_after: u32§block_after: u32§ban_after: u32§ban_duration_secs: u64§violation_decay_secs: u64Trait Implementations§
Source§impl Clone for RateConfig
impl Clone for RateConfig
Source§fn clone(&self) -> RateConfig
fn clone(&self) -> RateConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 RateConfig
impl Debug for RateConfig
Source§impl Default for RateConfig
impl Default for RateConfig
Source§impl<'de> Deserialize<'de> for RateConfig
impl<'de> Deserialize<'de> for RateConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RateConfig
impl RefUnwindSafe for RateConfig
impl Send for RateConfig
impl Sync for RateConfig
impl Unpin for RateConfig
impl UnsafeUnpin for RateConfig
impl UnwindSafe for RateConfig
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