pub struct RateLimiterConfig {
pub bandwidth: Option<TokenBucket>,
pub ops: Option<TokenBucket>,
}Expand description
RateLimiterConfig : Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the bandwidth and ops token buckets.
Fields§
§bandwidth: Option<TokenBucket>§ops: Option<TokenBucket>Implementations§
Source§impl RateLimiterConfig
impl RateLimiterConfig
Sourcepub fn new() -> RateLimiterConfig
pub fn new() -> RateLimiterConfig
Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the bandwidth and ops token buckets.
Trait Implementations§
Source§impl Clone for RateLimiterConfig
impl Clone for RateLimiterConfig
Source§fn clone(&self) -> RateLimiterConfig
fn clone(&self) -> RateLimiterConfig
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 moreSource§impl Debug for RateLimiterConfig
impl Debug for RateLimiterConfig
Source§impl Default for RateLimiterConfig
impl Default for RateLimiterConfig
Source§fn default() -> RateLimiterConfig
fn default() -> RateLimiterConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RateLimiterConfig
impl<'de> Deserialize<'de> for RateLimiterConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RateLimiterConfig
impl PartialEq for RateLimiterConfig
Source§impl Serialize for RateLimiterConfig
impl Serialize for RateLimiterConfig
impl StructuralPartialEq for RateLimiterConfig
Auto Trait Implementations§
impl Freeze for RateLimiterConfig
impl RefUnwindSafe for RateLimiterConfig
impl Send for RateLimiterConfig
impl Sync for RateLimiterConfig
impl Unpin for RateLimiterConfig
impl UnwindSafe for RateLimiterConfig
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