nodedb_lite/sync/array/inbound/mod.rs
1//! Inbound array CRDT message handler for NodeDB-Lite.
2//!
3//! [`ArrayInbound`] receives wire messages from Origin and applies them to the
4//! local engine state. It holds no socket: the sync transport decodes frames
5//! and reaches it through `SyncDelegate`.
6//!
7//! # Module layout
8//!
9//! - [`apply`] — [`LiteApplyEngine`] adapts engine state to the
10//! [`nodedb_array::sync::apply::ApplyEngine`] trait.
11//! - [`outcome`] — [`InboundOutcome`] enum returned by every dispatcher method.
12//! - [`dispatcher`] — [`ArrayInbound`] struct, snapshot assembly buffer, and
13//! shared helpers.
14//! - [`delta`], [`snapshot`], [`schema`], [`reject`] — one `impl ArrayInbound`
15//! block per wire-message family, with colocated unit tests.
16//! - [`resume`] — the catch-up requests a new sync session sends, and tracker
17//! access for the apply paths.
18//!
19//! # No outbound loop
20//!
21//! [`LiteApplyEngine`] operates at the engine layer below
22//! `NodeDbLite::array_put_cell`, so the Phase D outbound hook
23//! ([`crate::sync::array::ArrayOutbound`]) is never invoked for remotely-
24//! received ops. The receive path is therefore loop-free by construction.
25
26pub mod apply;
27pub mod delta;
28pub mod dispatcher;
29pub mod outcome;
30pub mod reject;
31pub mod resume;
32pub mod schema;
33pub mod snapshot;
34
35#[cfg(test)]
36pub(crate) mod fixtures;
37
38pub use apply::LiteApplyEngine;
39pub use dispatcher::ArrayInbound;
40pub use outcome::InboundOutcome;