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

Method allocate_author_seq

atomic-core/src/pristine/vault.rs:349–354  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Callers 1

vault_intent_createMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected