Mountain/IPC/Message/mod.rs
1//! # Message Module (IPC)
2//!
3//! ## RESPONSIBILITIES
4//! This module provides the core message types and routing infrastructure for
5//! the IPC layer. It defines the standard message format used for all
6//! communication between Wind (frontend) and Mountain (backend), and handles
7//! message routing to appropriate handlers.
8//!
9//! ## ARCHITECTURAL ROLE
10//! This module is part of the IPC communication layer in Mountain's
11//! architecture. It sits at the entry point of the IPC system, defining the
12//! contract for all IPC messages and managing their distribution to handlers.
13//!
14//! ## KEY COMPONENTS
15//!
16//! - **Types**: Core message structures (TauriIPCMessage, ConnectionStatus,
17//! etc.)
18//! - **Router**: Message routing logic to dispatch messages to handlers
19//!
20//! ## ERROR HANDLING
21//! All message operations return Result types with descriptive error messages
22//! for troubleshooting communication failures.
23//!
24//! ## LOGGING
25//! Trace-level logging for message routing, debug for listener registration,
26//! error forFailed operations.
27//!
28//! ## PERFORMANCE CONSIDERATIONS
29//! - Message cloning is minimized where possible
30//! - Listener lookups use HashMap for O(1) complexity
31//! - Message queuing handles backpressure when disconnected
32//!
33//! ## TODO
34//! - Add message batching support
35//! - Implement message priority queuing
36//! - Add message validation schemas
37
38pub mod Types;
39
40pub use Types::{ListenerCallback, SimpleConnectionStatus, TauriIPCMessage};