Allocate the next per-author sequence number, advancing that author's counter. Each author has an independent counter so offline teammates never collide on a human key.
(&mut self, author: &str)
| 370 | /// counter. Each author has an independent counter so offline teammates |
| 371 | /// never collide on a human key. |
| 372 | pub fn allocate_author_seq(&mut self, author: &str) -> u32 { |
| 373 | let next = self.intent_seq.entry(author.to_string()).or_insert(1); |
| 374 | let seq = *next; |
| 375 | *next = seq.saturating_add(1); |
| 376 | seq |
| 377 | } |
| 378 | |
| 379 | /// Compose the human display key `PROJECT::author::seq`. |
| 380 | /// |