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

Method iter_ref_mapping_bytes

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

Source from the content-addressed store, hash-verified

3071 }
3072
3073 fn iter_ref_mapping_bytes(&self) -> PristineResult<Vec<(u64, Vec<u8>)>> {
3074 let table = match self.txn.open_table(REF_MAPPINGS) {
3075 Ok(table) => table,
3076 Err(redb::TableError::TableDoesNotExist(_)) => return Ok(Vec::new()),
3077 Err(error) => return Err(PristineError::from(error)),
3078 };
3079 let mut rows = Vec::new();
3080 for row in table.iter()? {
3081 let (key, value) = row?;
3082 rows.push((key.value(), value.value().to_vec()));
3083 }
3084 Ok(rows)
3085 }
3086}
3087
3088impl GitShaIndexTxnT for ReadTxn {

Callers 3

list_ref_mappingsMethod · 0.45

Calls 3

valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected