(&mut self, batch: Vec<Product>)
| 146 | async fn drain(&mut self, batch: Vec<Product>); |
| 147 | |
| 148 | async fn handle_batch(&mut self, batch: Vec<Product>) -> Result<(), BatcherTerminate<Input>> { |
| 149 | |
| 150 | // we just check first product |
| 151 | // because we now all others same for current instance |
| 152 | |
| 153 | let ct = batch[0].ctype; |
| 154 | |
| 155 | match ct { |
| 156 | Category::Cars => { |
| 157 | self.batch_cars_insert(batch); |
| 158 | } |
| 159 | Category::Mobiles => { |
| 160 | self.batch_mobiles_insert(batch); |
| 161 | } |
| 162 | Category::Accessories => { |
| 163 | self.batch_accessories_insert(batch); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | |
| 168 | ProcResult::Continue |
| 169 | } |
| 170 | } |
| 171 | |
| 172 |
nothing calls this directly
no test coverage detected