stream-tungstenite 0.6.1

A streaming implementation of the Tungstenite WebSocket protocol
Documentation
//! 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 mod builtins;
mod host;
mod traits;

pub use builtins::{
    AdvancedStatusViewer, ConnectionStatus, LogLevel, LoggingConfig, LoggingExtension, StatusViewer,
};
pub use host::ExtensionHost;
pub use traits::{boxed, BoxExtension, Extension};