/// Adds to the weight of an element in the collection.
Adds to the weight of an element in the collection.
Adds to the weight of an element in the collection .
pub fn update(&mut self, element: D, change: R) {
        if self.buffer.len() == self.buffer.capacity() {
            if !self.buffer.is_empty() {
                self.handle
                    .session(self.cap.clone())
                    .give_iterator(self.buffer.drain(..));
            }
            // TODO : This is a fairly arbitrary choice; should probably use `Context::default_size()` or such.
            self.buffer.reserve(1024);
        }
        self.buffer.push((element, self.cap.time().clone(), change));
    }
pub fn update ( & mut self , element : D , change : R ) { if self . buffer . len ( ) == self . buffer . capacity ( ) { if ! self . buffer . is_empty ( ) { self . handle . session ( self . cap . clone ( ) ) . give_iterator ( self . buffer . drain ( .. ) ) ; } // TODO : This is a fairly arbitrary choice; should probably use `Context::default_size()` or such. self . buffer . reserve ( 1024 ) ; } self . buffer . push ( ( element , self . cap . time ( ) . clone ( ) , change ) ) ; }
Adds to the weight of an element in the collection.
Adds to the weight of an element in the collection .
&mut self
element
D
change
R