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

Method insert

atomic-remote/src/sync.rs:193–201  ·  view source on GitHub ↗

Insert a new entry into the cache.

(&mut self, sequence: u64, node: Node)

Source from the content-addressed store, hash-verified

191
192 /// Insert a new entry into the cache.
193 pub fn insert(&mut self, sequence: u64, node: Node) {
194 self.last_state = Some(node.state.clone());
195 self.entries.insert(sequence, node);
196 match self.last_sequence {
197 Some(last) if sequence > last => self.last_sequence = Some(sequence),
198 None => self.last_sequence = Some(sequence),
199 _ => {}
200 }
201 }
202
203 /// Remove all entries at or after a given sequence number.
204 ///

Callers 15

merge_items_into_sectionFunction · 0.45
to_agent_trace_recordFunction · 0.45
handle_tool_useMethod · 0.45
attach_unhashedFunction · 0.45
strip_unhashedFunction · 0.45
resolve_human_gateMethod · 0.45

Calls 1

cloneMethod · 0.45