Expand description
The isolated core contract for Pacta.
Pacta operates on three axioms:
- Registry is Lifecycle (no business logic, no retry/delay logic).
- Execution is Middleware.
- This contract has no dependency on other workspace crates.
Modules§
- kernel
- The sans-I/O lifecycle kernel.
Structs§
- Claim
- A claimed pact and the retainer required to settle it.
- Pact
- A durable obligation, generated from a Signal, ready to be executed.
Note the deliberate absence of
attempts,delay, andpriority. - Retainer
- A retainer: the authority token a registry issues with a claim and validates
when settling it. Authority is registry-validated — a forged identifier does not
match an issued claim — not proven by the type system. Construct via
Retainer::newand read the identifier viaRetainer::id. DerivesPartialEq/Eq/Hashso a durable backend can index lease state by holder identity — the orphan rule makes providing these the contract’s responsibility. - Timestamp
- A point in time as milliseconds since an epoch the runtime chooses. This is a
pure value: the core names time but never reads it. There is deliberately no
nowconstructor — a runtime obtains the current time and injects it, keeping lease decisions deterministic and testable.
Enums§
- Outcome
- The lifecycle outcome an execution produces for a claimed pact.
Traits§
- Registry
- The Registry manages the lifecycle of Pacts. It is a pure state machine.
Type Aliases§
- Settlement
- The lifecycle conclusion applied to a claim, currently a fulfilled or breached
Outcome.