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

Method iter_tree

atomic-core/src/pristine/txn/read.rs:456–473  ·  view source on GitHub ↗
(
        &self,
    )

Source from the content-addressed store, hash-verified

454 }
455
456 fn iter_tree(
457 &self,
458 ) -> PristineResult<Box<dyn Iterator<Item = Result<(String, Inode), PristineError>> + '_>> {
459 let table = self.txn.open_table(TREE)?;
460 // Collect to avoid lifetime issues
461 let mut results = Vec::new();
462 for result in table.iter()? {
463 match result {
464 Ok((k, v)) => {
465 results.push(Ok((k.value().to_string(), Inode::new(v.value()))));
466 }
467 Err(e) => {
468 results.push(Err(PristineError::Storage(Box::new(e))));
469 }
470 }
471 }
472 Ok(Box::new(results.into_iter()))
473 }
474
475 fn iter_inode_vertices(
476 &self,

Callers

nothing calls this directly

Calls 3

iterMethod · 0.45
pushMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected