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

Method internal

atomic-core/src/pristine/span_patch_storage.rs:680–695  ·  view source on GitHub ↗
(
        &mut self,
        txn: &T,
        hash: &Hash,
        missing: &'static str,
        metrics: &mut SpanContextBuildMetrics,
    )

Source from the content-addressed store, hash-verified

678
679impl SpanBuildLookups {
680 fn internal<T: SpanPatchReadTxn>(
681 &mut self,
682 txn: &T,
683 hash: &Hash,
684 missing: &'static str,
685 metrics: &mut SpanContextBuildMetrics,
686 ) -> Result<NodeId> {
687 if let Some(id) = self.internal.get(hash) {
688 metrics.internal_hits += 1;
689 return Ok(*id);
690 }
691 metrics.internal_lookups += 1;
692 let id = txn.get_internal(hash)?.context(missing)?;
693 self.internal.insert(*hash, id);
694 Ok(id)
695 }
696
697 fn file<T: SpanPatchReadTxn>(
698 &mut self,

Callers 1

Calls 4

getMethod · 0.65
contextMethod · 0.45
get_internalMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected