Skip to main content

Crate pacta_executor

Crate pacta_executor 

Source
Expand description

Pacta-native execution abstractions.

Structs§

Composition
A blind, ordered assembly of middleware composed over Identity. It is itself a Middleware, so applying it is just wrap.
Execution
A single attempt to fulfill a claimed pact.
Identity
The no-op middleware: wrap returns the executor unchanged. Identity is the neutral element of composition — the empty stack — so “zero middleware” is a first-class, holdable value rather than an absence.
Stack
Two middleware composed into one, reifying the closure property as a value: because Stack is itself a Middleware, a composed stack can be named, stored, and passed as one middleware before an executor exists. outer wraps the result of inner, so outer is applied last and therefore observes each execution first.

Enums§

Outcome
The lifecycle outcome an execution produces for a claimed pact.
Verdict
The decision a Policy renders for one infrastructure failure.

Traits§

Executor
Public role responsible for executing claimed pacts through middleware.
Middleware
A Pacta-native decorator over execution: the Tower Layer analog. Because wrap takes an Executor and returns an Executor, middleware compose arbitrarily (the closure property), which is how orchestration is composed onto the seam.
Policy
A user-obligation trait deciding, after a claimed pact’s execution fails with an infrastructure error, whether to keep letting the claim lapse (to be reclaimed and attempted again) or concede as a terminal breach.

Type Aliases§

Settlement
The lifecycle conclusion applied to a claim, currently a fulfilled or breached Outcome.