| 1820 | } |
| 1821 | |
| 1822 | fn iter_trunk_branches( |
| 1823 | &self, |
| 1824 | trunk_key: &[u8; 12], |
| 1825 | ) -> PristineResult<Box<dyn Iterator<Item = Result<[u8; 12], PristineError>> + '_>> { |
| 1826 | use crate::crdt::tables::TRUNK_BRANCHES; |
| 1827 | let table = crdt_multimap_opt!(self, TRUNK_BRANCHES, Ok(Box::new(std::iter::empty()))); |
| 1828 | let mut results: Vec<Result<[u8; 12], PristineError>> = Vec::new(); |
| 1829 | let values = table.get(trunk_key)?; |
| 1830 | for value_result in values { |
| 1831 | match value_result { |
| 1832 | Ok(access) => results.push(Ok(*access.value())), |
| 1833 | Err(e) => results.push(Err(PristineError::Storage(Box::new(e)))), |
| 1834 | } |
| 1835 | } |
| 1836 | Ok(Box::new(results.into_iter())) |
| 1837 | } |
| 1838 | |
| 1839 | fn iter_branch_leaves( |
| 1840 | &self, |