1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # `EngineConfig` – compile‑time tuning knobs
//!
//! This tiny struct distills the **numeric parameters** that govern
//! how the sync engine manages its *sliding window* of reliable, unordered
//! `MessageIndex` values. They are set **once at compile time** and cloned
//! into every `Engine` instance; no run‑time mutation is allowed, keeping the
//! hot path branch‑free.
//!
//! ### Why this formula?
//! Because `max_in_flight` is the maximum contiguous block that may be
//! outstanding. By flushing when we are `max_in_flight` counts away from the
//! wrap, we ensure the next batch of IDs will never collide with IDs still
//! referenced by the receiver, even under worst‑case re‑ordering.