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

Method get_external

atomic-core/src/pristine/txn/read.rs:220–230  ·  view source on GitHub ↗
(&self, id: NodeId)

Source from the content-addressed store, hash-verified

218 type Adj = AdjIterator;
219
220 fn get_external(&self, id: NodeId) -> PristineResult<Option<Hash>> {
221 let table = self.txn.open_table(EXTERNAL)?;
222 let result = table.get(id.get())?;
223 match result {
224 Some(value) => {
225 let bytes: &[u8; 32] = value.value();
226 Ok(Some(Hash::from_bytes(*bytes)))
227 }
228 None => Ok(None),
229 }
230 }
231
232 fn get_internal(&self, hash: &Hash) -> PristineResult<Option<NodeId>> {
233 let table = self.txn.open_table(INTERNAL)?;

Callers 5

record_stateMethod · 0.45
render_internalMethod · 0.45
frameMethod · 0.45
mark_change_appliedMethod · 0.45

Calls 5

valueMethod · 0.80
lockMethod · 0.80
getMethod · 0.65
unwrapMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected