pub struct FlowConfig {
pub bucket_capacity: usize,
pub refill_rate_bps: usize,
}Expand description
Configuration for the token bucket rate limiter.
Fields§
§bucket_capacity: usizeMaximum tokens (bytes) in the bucket.
refill_rate_bps: usizeRefill rate in bytes per second.
Trait Implementations§
Source§impl Clone for FlowConfig
impl Clone for FlowConfig
Source§fn clone(&self) -> FlowConfig
fn clone(&self) -> FlowConfig
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 FlowConfig
impl Debug for FlowConfig
Auto Trait Implementations§
impl Freeze for FlowConfig
impl RefUnwindSafe for FlowConfig
impl Send for FlowConfig
impl Sync for FlowConfig
impl Unpin for FlowConfig
impl UnwindSafe for FlowConfig
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