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

Method iter_trunk_branches

atomic-core/src/pristine/txn/write/mod.rs:2349–2363  ·  view source on GitHub ↗
(
        &self,
        trunk_key: &[u8; 12],
    )

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 4

valueMethod · 0.80
getMethod · 0.65
pushMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected