Module Types

Module Types 

Source
Expand description

§Message Types (IPC)

§RESPONSIBILITIES

This module defines the core data structures used for IPC communication between Wind (frontend) and Mountain (backend). It provides type-safe message formats that are serialized/deserialized for transport across the IPC boundary.

§ARCHITECTURAL ROLE

This module defines the contract for all IPC messages. It’s the foundation of the IPC communication layer, ensuring type safety and consistency across the Wind-Mountain bridge.

§KEY COMPONENTS

  • TauriIPCMessage: Standard message format for all IPC communication
  • ConnectionStatus: Connection health status reporting
  • ListenerCallback: Type definition for message event listeners

§ERROR HANDLING

Message types use serde for serialization/deserialization. Invalid messages will fail to parse with descriptive error messages.

§LOGGING

Debug-level logging for message metadata, trace for detailed message inspection.

§PERFORMANCE CONSIDERATIONS

  • Messages use efficient serde_json::Value for flexible data payloads
  • Timestamp uses u64 for compact representation
  • Option<> used for optional fields to minimize serialization overhead

§TODO

  • Add message payload size limits
  • Implement message versioning for compatibility
  • Add message priority field

Structs§

SimpleConnectionStatus
Connection status message for health monitoring
TauriIPCMessage
IPC message structure matching Wind’s ITauriIPCMessage interface

Type Aliases§

ListenerCallback
Listener callback type for handling incoming IPC messages