pub struct VelocityConfig {
pub max_invocations_per_window: Option<u32>,
pub max_spend_per_window: Option<u64>,
pub window_secs: u64,
pub burst_factor: f64,
}Expand description
Configuration for VelocityGuard.
Fields§
§max_invocations_per_window: Option<u32>Maximum invocations per window. None means unlimited.
max_spend_per_window: Option<u64>Maximum spend (monetary units) per window. None means unlimited.
window_secs: u64Window duration in seconds.
burst_factor: f64Burst factor (1.0 = no burst above steady rate).
Trait Implementations§
Source§impl Clone for VelocityConfig
impl Clone for VelocityConfig
Source§fn clone(&self) -> VelocityConfig
fn clone(&self) -> VelocityConfig
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 VelocityConfig
impl Debug for VelocityConfig
Auto Trait Implementations§
impl Freeze for VelocityConfig
impl RefUnwindSafe for VelocityConfig
impl Send for VelocityConfig
impl Sync for VelocityConfig
impl Unpin for VelocityConfig
impl UnsafeUnpin for VelocityConfig
impl UnwindSafe for VelocityConfig
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