| 2347 | } |
| 2348 | |
| 2349 | fn iter_trunk_branches( |
| 2350 | &self, |
| 2351 | trunk_key: &[u8; 12], |
| 2352 | ) -> PristineResult<Box<dyn Iterator<Item = Result<[u8; 12], PristineError>> + '_>> { |
| 2353 | let table = self.txn.open_multimap_table(TRUNK_BRANCHES)?; |
| 2354 | let mut results: Vec<Result<[u8; 12], PristineError>> = Vec::new(); |
| 2355 | let values = table.get(trunk_key)?; |
| 2356 | for value_result in values { |
| 2357 | match value_result { |
| 2358 | Ok(access) => results.push(Ok(*access.value())), |
| 2359 | Err(e) => results.push(Err(PristineError::Storage(Box::new(e)))), |
| 2360 | } |
| 2361 | } |
| 2362 | Ok(Box::new(results.into_iter())) |
| 2363 | } |
| 2364 | |
| 2365 | fn iter_branch_leaves( |
| 2366 | &self, |