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

Method allocate_author_seq

atomic-core/src/pristine/vault.rs:372–377  ·  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

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

Callers 1

vault_intent_createMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected