Module handoff

Module handoff 

Source
Expand description

Handoff typestate for compile-time safety of handoff lifecycle.

Uses the typestate pattern to make invalid state transitions uncompilable.

§State Transition Diagram

create() → Initiated ──┬── accept() ──→ Accepted ── complete() → Completed
                       └── reject() ──→ Rejected (terminal)

Modules§

private 🔒

Structs§

Handoff
A handoff with compile-time state tracking.
HandoffAccepted
Handoff was accepted by the receiving agent.
HandoffCompleted
Handoff has been completed (terminal).
HandoffRecord
Internal data storage for a handoff, independent of typestate. This is what gets persisted to the database.
Initiated
Handoff has been initiated, waiting for acceptance.
Rejected
Handoff was rejected by the receiving agent (terminal).
StoredHandoff
A handoff as stored in the database (status-agnostic).

Enums§

HandoffStateError
Errors when transitioning handoff states.
HandoffStatus
Status of a handoff operation.
LoadedHandoff
Enum representing all possible runtime states of a handoff. Use this when you need to handle handoffs loaded from the database.

Traits§

HandoffState
Marker trait for handoff states.