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
52
53
54
55
56
//! Extension system for WebSocket client.
//!
//! This module provides a flexible extension system that allows users to:
//! - Hook into connection lifecycle events (connect, disconnect, shutdown)
//! - Process and transform incoming messages
//! - Add custom logging, metrics, or other cross-cutting concerns
//!
//! # Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────┐
//! │ Extension System │
//! │ │
//! │ ┌──────────────────────────────────────────────────────┐ │
//! │ │ ExtensionHost │ │
//! │ │ - Manages registered extensions │ │
//! │ │ - Dispatches lifecycle events │ │
//! │ │ - Routes messages through extension pipeline │ │
//! │ └──────────────────────────────────────────────────────┘ │
//! │ │ │
//! │ ┌──────────────────────────────┐ │
//! │ ▼ ▼ │
//! │ ┌────────────┐ ┌────────────────────┐ │
//! │ │ Lifecycle │ or message │ Extension (both) │ │
//! │ │ callbacks │ processors │ with filters │ │
//! │ └────────────┘ └────────────────────┘ │
//! └─────────────────────────────────────────────────────────────┘
//! ```
//!
//! # Example
//!
//! ```rust,ignore
//! use stream_tungstenite::extension::{Extension, ExtensionHost, LoggingExtension};
//!
//! // Create an extension host
//! let host = ExtensionHost::new();
//!
//! // Register a built-in logging extension
//! host.register(LoggingExtension::new()).await?;
//!
//! // Register a custom extension
//! host.register(MyCustomExtension::new()).await?;
//!
//! // Notify extensions of connection
//! host.notify_connect().await?;
//! ```
pub use ;
pub use ExtensionHost;
pub use ;