pub fn update(&mut self, capacity: usize, rate: u64, now: Instant) {
        let capacity = capacity / self.max_datagram_size * self.max_datagram_size;

        if self.capacity != capacity {
            self.reset(now);
        }

        self.capacity = capacity;

        self.rate = rate;
    }
// Update bucket capacity or pacing_rate.
Update bucket capacity or pacing_rate.
Update bucket capacity or pacing_rate .
pub fn update(&mut self, capacity: usize, rate: u64, now: Instant) {
        let capacity = capacity / self.max_datagram_size * self.max_datagram_size;
        if self.capacity != capacity {
            self.reset(now);
        }
        self.capacity = capacity;
        self.rate = rate;
    }
pub fn update ( & mut self , capacity : usize , rate : u64 , now : Instant ) { let capacity = capacity / self . max_datagram_size * self . max_datagram_size ; if self . capacity != capacity { self . reset ( now ) ; } self . capacity = capacity ; self . rate = rate ; }
Update bucket capacity or pacing_rate.
Update bucket capacity or pacing_rate .
&mut self
capacity
usize
rate
u64
now
Instant
&mut self
capacity
usize
rate
u64
now
Instant