Skip to main content

Module delegate

Module delegate 

Source
Expand description

SyncDelegate โ€” the callback interface the transport uses to read pending work from the owning NodeDbLite and to apply inbound state changes.

Held as Arc<dyn SyncDelegate> by the transport so the runner does not own the database.

The trait compiles without the sync feature. NodeDbLite implements it in every native build, so inbound-apply logic stays testable and usable by an embedder-provided transport. Only the WebSocket transport that drives it is feature-gated.

Traitsยง

SyncDelegate
Callback interface for the sync runner to read/write pending deltas from the owning NodeDbLite. This avoids the runner owning the database.