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
//! Ephemeral (non-persisted) messaging for Subduction.
//!
//! Provides authenticated, fire-and-forget messaging scoped to
//! [`SedimentreeId`] topics. Primary use cases: cursor positions,
//! selections, presence-in-document, typing indicators, and other
//! transient application-level signals.
//!
//! # Architecture
//!
//! ```text
//! subduction_core subduction_ephemeral
//! ┌──────────────────────┐ ┌────────────────────────┐
//! │ Connection<K, M> │ │ EphemeralMessage │
//! │ Handler<K, C> │◄───────────│ EphemeralHandler │
//! │ SyncMessage │ │ EphemeralPolicy │
//! │ SyncHandler │ └────────────────────────┘
//! └──────────────────────┘
//! ```
//!
//! The core crate knows nothing about ephemeral behavior. This crate
//! defines its own message type ([`EphemeralMessage`]), policy trait
//! ([`EphemeralPolicy`]), and handler ([`EphemeralHandler`]).
//!
//! Wire multiplexing (combining sync, ephemeral, and keyhive messages
//! into a single envelope type) is the application's responsibility.
//! See `subduction_wasm` for an example `WireMessage` enum.
//!
//! [`SedimentreeId`]: sedimentree_core::id::SedimentreeId
extern crate alloc;