pub struct BucketParams {
pub capacity: f64,
pub refill_per_sec: f64,
}Expand description
Parameters of one token bucket, passed per call so the store stays free of config: a hot reload changes capacity/refill on the module while the store keeps the live buckets, and the same key can be re-parameterised without a store reset.
Fields§
§capacity: f64§refill_per_sec: f64Trait Implementations§
Source§impl Clone for BucketParams
impl Clone for BucketParams
Source§fn clone(&self) -> BucketParams
fn clone(&self) -> BucketParams
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 moreimpl Copy for BucketParams
Auto Trait Implementations§
impl Freeze for BucketParams
impl RefUnwindSafe for BucketParams
impl Send for BucketParams
impl Sync for BucketParams
impl Unpin for BucketParams
impl UnsafeUnpin for BucketParams
impl UnwindSafe for BucketParams
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