Start a batch for efficient writing. If there is already a batch started, this does nothing and the existing batch is retained.
(&mut self)
| 551 | /// |
| 552 | /// If there is already a batch started, this does nothing and the existing batch is retained. |
| 553 | pub fn start_batch(&mut self) { |
| 554 | if self.batch.is_none() { |
| 555 | self.batch = Some(ObjectMemoryMap::new(self.mem.storage, self.mem.compat)); |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | pub fn batch_len(&self) -> Option<usize> { |
| 560 | self.batch.as_ref().map(|b| b.len()) |