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

Method internal

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

Source from the content-addressed store, hash-verified

502
503impl SpanBuildLookups {
504 fn internal<T: SpanPatchReadTxn>(
505 &mut self,
506 txn: &T,
507 hash: &Hash,
508 missing: &'static str,
509 metrics: &mut SpanContextBuildMetrics,
510 ) -> Result<NodeId> {
511 if let Some(id) = self.internal.get(hash) {
512 metrics.internal_hits += 1;
513 return Ok(*id);
514 }
515 metrics.internal_lookups += 1;
516 let id = txn.get_internal(hash)?.context(missing)?;
517 self.internal.insert(*hash, id);
518 Ok(id)
519 }
520
521 fn file<T: SpanPatchReadTxn>(
522 &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