Struct longbridge_wscli::RateLimit
source · pub struct RateLimit {
pub interval: Duration,
pub initial: usize,
pub max: usize,
pub refill: usize,
}Expand description
Rate limiter config
Fields
interval: DurationThe time duration between which we add refill number to the bucket
initial: usizeThe initial number of tokens
max: usizeThe max number of tokens to use
refill: usizeThe number of tokens to add at each interval interval
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RateLimit
impl Send for RateLimit
impl Sync for RateLimit
impl Unpin for RateLimit
impl UnwindSafe for RateLimit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more