Expand description
Moving a row between states: the only writer of state, and the one place an edge is checked
against CreditRegistrationState::allowed_targets.
Structs§
- Batch
Move - One row’s move in a
transition_batch. - Transition
Enums§
- Admin
Attention - What a move does to the row’s admin-attention flag.
- Transition
Policy - Which (from → to) edges
transitionwill write. - Transitioned
- What
transition_unless_moved_ondid.
Functions§
- check_
edge 🔒 - Refuses an edge outside the policy. The one place (from → to) legality is decided, for the
single-row
transitionand the batchedtransition_batchalike. - lock_
for_ 🔒moves - The states of the named rows, locked until the caller’s transaction ends.
- settle_
pending_ 🔒supersessions - Completes or abandons the pending supersessions of rows that were waiting on these attempts, as each attempt’s new state decides.
- transition
- Moves a ledger row to a new state and appends the matching audit event, atomically.
- transition_
batch transitionfor a whole batch: one lock, one update, one insert of events, whatever the size.- transition_
unless_ moved_ on transitionfor a caller deciding from a snapshot another writer may have overtaken: a row no longer inexpected_from_statecomes back asTransitioned::MovedOnrather than as an error, since the row is now that writer’s and the caller carries on with the rest of its work.- write_
moves 🔒 - Writes already checked moves of locked rows, with their events, and returns the rows as written.