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)
| 347 | /// counter. Each author has an independent counter so offline teammates |
| 348 | /// never collide on a human key. |
| 349 | pub fn allocate_author_seq(&mut self, author: &str) -> u32 { |
| 350 | let next = self.intent_seq.entry(author.to_string()).or_insert(1); |
| 351 | let seq = *next; |
| 352 | *next = seq.saturating_add(1); |
| 353 | seq |
| 354 | } |
| 355 | |
| 356 | /// Compose the human display key `PROJECT::author::seq`. |
| 357 | /// |