pub struct ThrottlerConfig {
pub max_requests: usize,
pub period: Duration,
pub strategy: ThrottleStrategy,
}Fields§
§max_requests: usizeMaximum messages per time window
period: DurationTime window duration
strategy: ThrottleStrategyBehavior when throttled
Implementations§
Trait Implementations§
Source§impl Clone for ThrottlerConfig
impl Clone for ThrottlerConfig
Source§fn clone(&self) -> ThrottlerConfig
fn clone(&self) -> ThrottlerConfig
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 moreAuto Trait Implementations§
impl Freeze for ThrottlerConfig
impl RefUnwindSafe for ThrottlerConfig
impl Send for ThrottlerConfig
impl Sync for ThrottlerConfig
impl Unpin for ThrottlerConfig
impl UnsafeUnpin for ThrottlerConfig
impl UnwindSafe for ThrottlerConfig
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