Expand description
Synchronization lifecycle of one subscribed book.
BookSync holds the state an adapter tracks per book: its phase, the time of its last
accepted frame, a pending snapshot wait, and its recovery episode. It performs no I/O and takes
&mut self, so an adapter keeps it under its existing state lock or owning task.
§Sync Contract
- Output happens only in
BookPhase::Synced, which starts with an accepted snapshot. - A book out of sync needs an owner: a running recovery or an armed snapshot deadline.
BookSync::gapreturnsBookSequenceOutcome::Recoverwhen it has neither, and the adapter then claims a recovery once it has what the replacement needs. - The adapter passes every incremental update for an unsynced book through
BookSync::gap, so a book whose recovery could not start asks again on its next update. BookSync::stalereports a book that stops advancing without a running recovery.
§Adapters
The adapter keeps its venue sequence rule, wire commands, snapshot parsing, and buffers, and
stores the venue position of the last accepted frame as P.
Structs§
- Book
Sync - Synchronization state of one subscribed book.
Enums§
- Book
Phase - Synchronization phase of one book.