pub struct RunId(/* private fields */);Expand description
Identifier of one supervised CLI execution.
Lives here with the other identifiers rather than with the cost ledger that first needed it: a run is a core domain object, and several parts of the Tower will key off it.
Implementations§
Source§impl RunId
impl RunId
Sourcepub fn minted_at(&self) -> Option<Timestamp>
pub fn minted_at(&self) -> Option<Timestamp>
When this identifier was minted, which is when its run began.
A ULID carries a millisecond timestamp in its leading bits, so a run’s own name says how
old it is. That matters because a run’s Hangar outlives the process: retention needs a
directory’s age, and asking the name is exact where asking the filesystem is a guess — a
copy, a restore or a backup tool rewrites mtime, which would make old work look new or
new work look expired.
None when the identifier was not minted by Self::generate — anything hand-made, or a
directory somebody else left in a Hangar. Callers should read that as “do not touch”
rather than “too old”.