| 1221 | } |
| 1222 | |
| 1223 | fn iter_trunk_branches( |
| 1224 | &self, |
| 1225 | trunk_key: &[u8; 12], |
| 1226 | ) -> PristineResult<Box<dyn Iterator<Item = Result<[u8; 12], PristineError>> + '_>> { |
| 1227 | use crate::crdt::tables::TRUNK_BRANCHES; |
| 1228 | let table = crdt_multimap_opt!(self, TRUNK_BRANCHES, Ok(Box::new(std::iter::empty()))); |
| 1229 | let mut results: Vec<Result<[u8; 12], PristineError>> = Vec::new(); |
| 1230 | let values = table.get(trunk_key)?; |
| 1231 | for value_result in values { |
| 1232 | match value_result { |
| 1233 | Ok(access) => results.push(Ok(*access.value())), |
| 1234 | Err(e) => results.push(Err(PristineError::Storage(Box::new(e)))), |
| 1235 | } |
| 1236 | } |
| 1237 | Ok(Box::new(results.into_iter())) |
| 1238 | } |
| 1239 | |
| 1240 | fn iter_branch_leaves( |
| 1241 | &self, |