(mut self, parents: I)
| 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( |