pub fn update_buckets(&mut self, bytes: BucketUpdate, ops: BucketUpdate) {
        match bytes {
            BucketUpdate::Disabled => self.bandwidth = None,
            BucketUpdate::Update(tb) => self.bandwidth = Some(tb),
            BucketUpdate::None => (),
        };
        match ops {
            BucketUpdate::Disabled => self.ops = None,
            BucketUpdate::Update(tb) => self.ops = Some(tb),
            BucketUpdate::None => (),
        };
    }
/// Updates the parameters of the token buckets associated with this RateLimiter.
// TODO: Please note that, right now, the buckets become full after being updated.
Updates the parameters of the token buckets associated with this RateLimiter.
TODO: Please note that, right now, the buckets become full after being updated.
Updates the parameters of the token buckets associated with this RateLimiter . TODO : Please note that right now the buckets become full after being updated .
pub fn update_buckets(&mut self, bytes: BucketUpdate, ops: BucketUpdate) {
        match bytes {
            BucketUpdate::Disabled => self.bandwidth = None,
            BucketUpdate::Update(tb) => self.bandwidth = Some(tb),
            BucketUpdate::None => (),
        };
        match ops {
            BucketUpdate::Disabled => self.ops = None,
            BucketUpdate::Update(tb) => self.ops = Some(tb),
            BucketUpdate::None => (),
        };
    }
pub fn update_buckets ( & mut self , bytes : BucketUpdate , ops : BucketUpdate ) { match bytes { BucketUpdate :: Disabled => self . bandwidth = None , BucketUpdate :: Update ( tb ) => self . bandwidth = Some ( tb ) , BucketUpdate :: None => ( ) , } ; match ops { BucketUpdate :: Disabled => self . ops = None , BucketUpdate :: Update ( tb ) => self . ops = Some ( tb ) , BucketUpdate :: None => ( ) , } ; }
Updates the parameters of the token buckets associated with this RateLimiter.
Updates the parameters of the token buckets associated with this RateLimiter .
&mut self
bytes
BucketUpdate
ops
BucketUpdate
&mut self
bytes
BucketUpdate
ops
BucketUpdate