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

Method with_causal_parents

atomic-agent/src/event.rs:604–613  ·  view source on GitHub ↗
(mut self, parents: I)

Source from the content-addressed store, hash-verified

602
603 #[must_use]
604 pub fn with_causal_parents<I, S>(mut self, parents: I) -> Self
605 where
606 I: IntoIterator<Item = S>,
607 S: Into<String>,
608 {
609 self.causal_parent_ids = parents.into_iter().map(Into::into).collect();
610 self.causal_parent_ids.sort();
611 self.causal_parent_ids.dedup();
612 self
613 }
614
615 /// Derive a retry-stable ID from turn identity and the complete event body.
616 pub fn deterministic_id(

Calls 3

sortMethod · 0.80
collectMethod · 0.45
into_iterMethod · 0.45