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

Method compose_human_key

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

Compose the human display key `PROJECT::author::seq`. The project is uppercased (it is a code); the author handle is kept verbatim (it may contain `-`), which is unambiguous because the fields are separated by [`HUMAN_KEY_SEP`] (`::`), not `-`.

(project: &str, author: &str, seq: u32)

Source from the content-addressed store, hash-verified

407 /// verbatim (it may contain `-`), which is unambiguous because the fields
408 /// are separated by [`HUMAN_KEY_SEP`] (`::`), not `-`.
409 pub fn compose_human_key(project: &str, author: &str, seq: u32) -> String {
410 format!(
411 "{}{sep}{}{sep}{}",
412 project.to_uppercase(),
413 author,
414 seq,
415 sep = HUMAN_KEY_SEP
416 )
417 }
418}
419
420/// The field separator for human intent keys. `::` (not `-`) so an author

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected