Struct libp2p_relay::v2::relay::rate_limiter::GenericRateLimiterConfig
source · pub struct GenericRateLimiterConfig {
pub limit: NonZeroU32,
pub interval: Duration,
}
Expand description
Configuration for a RateLimiter
.
Fields§
§limit: NonZeroU32
The maximum number of tokens in the bucket at any point in time.
interval: Duration
The interval at which a single token is added to the bucket.
Trait Implementations§
source§impl Clone for RateLimiterConfig
impl Clone for RateLimiterConfig
source§fn clone(&self) -> RateLimiterConfig
fn clone(&self) -> RateLimiterConfig
Returns a copy 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 more