MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / iter_branch_leaves

Method iter_branch_leaves

atomic-core/src/pristine/txn/read.rs:1414–1429  ·  view source on GitHub ↗
(
        &self,
        branch_key: &[u8; 12],
    )

Source from the content-addressed store, hash-verified

1412 }
1413
1414 fn iter_branch_leaves(
1415 &self,
1416 branch_key: &[u8; 12],
1417 ) -> PristineResult<Box<dyn Iterator<Item = Result<[u8; 12], PristineError>> + '_>> {
1418 use crate::crdt::tables::BRANCH_LEAVES;
1419 let table = crdt_multimap_opt!(self, BRANCH_LEAVES, Ok(Box::new(std::iter::empty())));
1420 let mut results: Vec<Result<[u8; 12], PristineError>> = Vec::new();
1421 let values = table.get(branch_key)?;
1422 for value_result in values {
1423 match value_result {
1424 Ok(access) => results.push(Ok(*access.value())),
1425 Err(e) => results.push(Err(PristineError::Storage(Box::new(e)))),
1426 }
1427 }
1428 Ok(Box::new(results.into_iter()))
1429 }
1430
1431 fn get_crdt_branch_vertex(
1432 &self,

Callers 1

get_file_lines_by_trunkFunction · 0.45

Calls 3

getMethod · 0.65
pushMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected