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

Method get_ref_mapping_bytes

atomic-core/src/pristine/txn/read.rs:3064–3071  ·  view source on GitHub ↗
(&self, view_id: u64)

Source from the content-addressed store, hash-verified

3062
3063impl RefMappingTxnT for ReadTxn {
3064 fn get_ref_mapping_bytes(&self, view_id: u64) -> PristineResult<Option<Vec<u8>>> {
3065 let table = match self.txn.open_table(REF_MAPPINGS) {
3066 Ok(table) => table,
3067 Err(redb::TableError::TableDoesNotExist(_)) => return Ok(None),
3068 Err(error) => return Err(PristineError::from(error)),
3069 };
3070 Ok(table.get(view_id)?.map(|guard| guard.value().to_vec()))
3071 }
3072
3073 fn iter_ref_mapping_bytes(&self) -> PristineResult<Vec<(u64, Vec<u8>)>> {
3074 let table = match self.txn.open_table(REF_MAPPINGS) {

Callers 2

get_ref_mappingMethod · 0.45

Calls 2

valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected