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

Method contains

atomic-core/src/pristine/span_patch_storage.rs:792–806  ·  view source on GitHub ↗
(&self, descendant: NodeId, ancestor: NodeId)

Source from the content-addressed store, hash-verified

790 }
791
792 fn contains(&self, descendant: NodeId, ancestor: NodeId) -> Option<bool> {
793 let d = self
794 .ranks
795 .binary_search_by_key(&descendant.get(), |(id, _)| id.get())
796 .ok()?;
797 let a = self
798 .ranks
799 .binary_search_by_key(&ancestor.get(), |(id, _)| id.get())
800 .ok()?;
801 if descendant == ancestor {
802 return Some(false);
803 }
804 let (d, a) = (self.ranks[d].1, self.ranks[a].1);
805 Some(self.bits[d * self.words + a / 64] & (1u64 << (a % 64)) != 0)
806 }
807}
808
809/// Validated span content shared by file renders in one read transaction.

Callers 10

index_changeFunction · 0.45
semantic_baseline_idMethod · 0.45
render_if_visibleMethod · 0.45
has_visible_contentMethod · 0.45
record_stateMethod · 0.45
render_internalMethod · 0.45
depends_onMethod · 0.45
frameMethod · 0.45
render_legacy_stateMethod · 0.45

Calls 2

getMethod · 0.65
okMethod · 0.45