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

Method iter_branch_leaves

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

Source from the content-addressed store, hash-verified

1238 }
1239
1240 fn iter_branch_leaves(
1241 &self,
1242 branch_key: &[u8; 12],
1243 ) -> PristineResult<Box<dyn Iterator<Item = Result<[u8; 12], PristineError>> + '_>> {
1244 use crate::crdt::tables::BRANCH_LEAVES;
1245 let table = crdt_multimap_opt!(self, BRANCH_LEAVES, Ok(Box::new(std::iter::empty())));
1246 let mut results: Vec<Result<[u8; 12], PristineError>> = Vec::new();
1247 let values = table.get(branch_key)?;
1248 for value_result in values {
1249 match value_result {
1250 Ok(access) => results.push(Ok(*access.value())),
1251 Err(e) => results.push(Err(PristineError::Storage(Box::new(e)))),
1252 }
1253 }
1254 Ok(Box::new(results.into_iter()))
1255 }
1256
1257 fn get_crdt_branch_vertex(
1258 &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