pub enum State {
Available,
Held {
retainer: Retainer,
expiry: Timestamp,
},
Deferred {
reclaimable_at: Timestamp,
},
Settled,
}Expand description
A pact’s position in its claim lifecycle: the pure state a backend maps to its own storage. The backend owns where it lives; this owns what it means.
For the 0.2 series this is a closed enumeration of exactly these four variants — it is
deliberately not #[non_exhaustive] — so a backend author knows the complete set of states to
represent and can match it exhaustively, distinct from the growing #[non_exhaustive]
protocol enums (Directive/Notice/StepResult) elsewhere in this crate. (This is a
stability statement for 0.2.x, not a promise never to evolve the model in a later minor.)
Variants§
Available
Never claimed, or freshly seeded: immediately claimable.
Held
Held under a lease by retainer until expiry. Claimable again only once
the lease has lapsed (expiry < now), which rotates authority away.
Fields
Deferred
Released non-terminally: claimable again only at or after reclaimable_at.
Settled
Concluded (fulfilled or breached): never claimable again.
This is the model (and reference-backend) representation of a concluded obligation, not a required storage obligation. A durable backend MAY represent settled by removing the row — a load of the absent row returns no state, so the pact is trivially not claimable and the prior retainer can no longer transition it, which is the whole of what settlement guarantees. Do not assume a settled pact persists.