Hold `bytes` as `hash`'s content at `start..start + bytes.len()`.
(&self, hash: Hash, start: u64, bytes: Vec<u8>)
| 497 | |
| 498 | /// Hold `bytes` as `hash`'s content at `start..start + bytes.len()`. |
| 499 | pub fn hold_span(&self, hash: Hash, start: u64, bytes: Vec<u8>) { |
| 500 | if let Ok(mut spans) = self.spans.write() { |
| 501 | let end = start + bytes.len() as u64; |
| 502 | spans.spans.insert((hash, start), (end, bytes)); |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | /// Drop every held span. |
| 507 | pub fn clear_spans(&self) { |
no test coverage detected