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

Method get_binding_bytes

atomic-core/src/pristine/txn/read.rs:2969–2976  ·  view source on GitHub ↗
(&self, id: &[u8; 32])

Source from the content-addressed store, hash-verified

2967
2968impl crate::pristine::BindingTxnT for ReadTxn {
2969 fn get_binding_bytes(&self, id: &[u8; 32]) -> PristineResult<Option<Vec<u8>>> {
2970 let table = match self.txn.open_table(BINDINGS) {
2971 Ok(table) => table,
2972 Err(redb::TableError::TableDoesNotExist(_)) => return Ok(None),
2973 Err(error) => return Err(PristineError::from(error)),
2974 };
2975 Ok(table.get(id)?.map(|value| value.value().to_vec()))
2976 }
2977
2978 fn iter_binding_ids(&self) -> PristineResult<Vec<[u8; 32]>> {
2979 let table = match self.txn.open_table(BINDINGS) {

Callers 2

load_bindingMethod · 0.45

Calls 2

valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected