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
Auto Trait Implementations
impl RefUnwindSafe for RateLimiterConfig
impl Send for RateLimiterConfig
impl Sync for RateLimiterConfig
impl Unpin for RateLimiterConfig
impl UnwindSafe for RateLimiterConfig
Blanket Implementations
Mutably borrows from an owned value. Read more