Get the next intent ID and advance the counter. Returns a string like "PIMO-1", "ATOM-42". Legacy (pre-ULID) allocation. New intents use [`allocate_author_seq`](Self::allocate_author_seq) + [`compose_human_key`](Self::compose_human_key) and a ULID primary id.
(&mut self)
| 324 | /// [`allocate_author_seq`](Self::allocate_author_seq) + |
| 325 | /// [`compose_human_key`](Self::compose_human_key) and a ULID primary id. |
| 326 | pub fn allocate_intent_id(&mut self) -> String { |
| 327 | let id = self.next_intent_id; |
| 328 | self.next_intent_id = id.saturating_add(1); |
| 329 | let prefix = if self.intent_prefix.is_empty() { |
| 330 | "VAULT" |
| 331 | } else { |
| 332 | &self.intent_prefix |
| 333 | }; |
| 334 | format!("{}-{}", prefix, id) |
| 335 | } |
| 336 | |
| 337 | /// The project code used in human keys (falls back to `VAULT`). |
| 338 | pub fn project_code(&self) -> &str { |