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)
| 395 | /// counter. Each author has an independent counter so offline teammates |
| 396 | /// never collide on a human key. |
| 397 | pub fn allocate_author_seq(&mut self, author: &str) -> u32 { |
| 398 | let next = self.intent_seq.entry(author.to_string()).or_insert(1); |
| 399 | let seq = *next; |
| 400 | *next = seq.saturating_add(1); |
| 401 | seq |
| 402 | } |
| 403 | |
| 404 | /// Compose the human display key `PROJECT::author::seq`. |
| 405 | /// |