Expand description
Typestate connection management for MCP servers.
This module implements the typestate pattern for managing connection lifecycle, ensuring compile-time correctness of state transitions.
§Connection Lifecycle
Disconnected -> Connected -> Initializing -> Ready -> ClosingEach state transition is enforced at compile time through different types, preventing invalid state transitions.
Modules§
- markers
- Connection state markers.
Structs§
- Connection
- A typestate connection that tracks lifecycle state at the type level.
- Connection
Data - Internal connection data shared across states.
Enums§
- Connection
Event - Transition events for connection state changes.
- Connection
State - A state machine wrapper for connections that allows runtime state tracking.