Merge another set of hashes into this table. This is useful during parallel recording where each thread collects referenced hashes independently, then the main thread merges them into a single table. Hashes that already exist in the table are skipped (idempotent). # Arguments `hashes` - Iterator of hashes to add. # Errors - [`FormatError::HashTableFull`] if merging would exceed capacity. #
(&mut self, hashes: impl Iterator<Item = [u8; 32]>)
| 664 | /// assert_eq!(table.len(), 3); // self + 2 new (dup skipped) |
| 665 | /// ``` |
| 666 | pub fn merge(&mut self, hashes: impl Iterator<Item = [u8; 32]>) -> FormatResult<()> { |
| 667 | for hash in hashes { |
| 668 | self.insert(hash)?; |
| 669 | } |
| 670 | Ok(()) |
| 671 | } |
| 672 | |
| 673 | /// Return statistics about the table for debugging and logging. |
| 674 | /// |