Skip to main content

Module decision

Module decision 

Source
Expand description

What one answer does to its row, and writing it there, guarded by the state the claim expects.

Structs§

AtomicChanges 🔒
Written in the transition’s transaction, alongside the retry count and next enrolment check the outcome asks for, so they roll back with a row that moved on.
Decision 🔒
What one answer does to its row: the move, the timeline line and error that go with it, and the writes it asks for, grouped by whether they outlive a lost race. The exchange behind the answer is the caller’s crate::registry::ExchangeAudit, not part of the decision.
PreTransitionChanges 🔒
Written before the guarded transition and kept even when the row moved on meanwhile: each records something the registry already did or said.

Enums§

Applied 🔒
What writing one answer did to its row.
PayloadChange 🔒
What a resolved enrolment does to the payload a row carries.

Functions§

write_before_transition 🔒
write_decision 🔒
Writes a decision made from the registry’s answer, or its refusal, to the claimed row, with the exchange behind it on the event. Lands only if the row is still in the claim’s expected state.
write_decision_committing_if_written 🔒
write_decision as the last write of tx, committing it only if the decision landed, so everything tx wrote for a row that moved on meanwhile rolls back with it.
write_outcome 🔒
transition is decision’s move, with the event it is recorded under.
write_payload_change 🔒
write_unasked_move 🔒
write_decision for a move made without asking the study registry, which has no exchange to record. A claim’s own moves go through here too, so they are guarded like every other write.