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
44
45
46
47
48
49
50
51
//! Braid HTTP server implementation.
//!
//! This module provides server-side support for the Braid protocol using Axum.
//! It enables applications to:
//!
//! - **Track resource versions** as a directed acyclic graph (DAG)
//! - **Send updates** as snapshots or patches
//! - **Stream subscription updates** to clients (HTTP 209)
//! - **Handle version conflicts** with merge strategies
//! - **Manage resource state** with CRDT support
//!
//! # Module Organization
//!
//! ```text
//! server/
//! ├── middleware - BraidLayer and BraidState extractor
//! ├── send_update - SendUpdateExt trait for responses
//! ├── parse_update - ParseUpdateExt trait for requests
//! ├── config - ServerConfig options
//! ├── resource_state - ResourceStateManager for CRDT state
//! └── conflict_resolver - ConflictResolver for merging
//! ```
pub use UpdateResponse;
pub use ServerConfig;
pub use ConflictResolver;
pub use ;
pub use ParseUpdateExt;
pub use ResourceStateManager;
pub use SendUpdateExt;
use crateUpdate;
use Arc;
use broadcast;
/// Broadcast channel for sending updates to multiple subscribers.
pub type UpdateBroadcast = Sender;