MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / snapshot

Method snapshot

nodedb/src/engine/bitemporal/registry.rs:123–126  ·  view source on GitHub ↗

Snapshot all registered entries. Used by the enforcement loop to iterate without holding the lock across dispatches.

(&self)

Source from the content-addressed store, hash-verified

121 /// Snapshot all registered entries. Used by the enforcement loop to
122 /// iterate without holding the lock across dispatches.
123 pub fn snapshot(&self) -> Vec<Entry> {
124 let r = self.inner.read().unwrap_or_else(|p| p.into_inner());
125 r.values().cloned().collect()
126 }
127
128 pub fn is_empty(&self) -> bool {
129 let r = self.inner.read().unwrap_or_else(|p| p.into_inner());

Callers 2

enforcement_loopFunction · 0.45

Calls 2

collectMethod · 0.80
readMethod · 0.45

Tested by 1