A Batch is a collection of items that are collected over a period of time.
| 31 | |
| 32 | // A Batch is a collection of items that are collected over a period of time. |
| 33 | pub trait Batch<I> { |
| 34 | // Push an item onto the batch. If the batch is complete, return the size. |
| 35 | fn push(&mut self, item: impl Iterator<Item = I>) -> Option<usize>; |
| 36 | |
| 37 | // Finish the batch. Will only be called if there is a batch fill timeout. Return the size. |
| 38 | fn finish(&mut self) -> usize; |
| 39 | } |
| 40 | |
| 41 | // A combined batch and its size. Used for construction of both pending batches as well as entries |
| 42 | // in the LIFO/FIFO queue. |
nothing calls this directly
no outgoing calls
no test coverage detected