http_request/websocket/websocket/type.rs
1use crate::*;
2
3/// Boxed synchronous WebSocket trait object.
4pub type BoxWebSocketTrait = Box<dyn WebSocketTrait>;
5/// Boxed asynchronous WebSocket trait object.
6pub type BoxAsyncWebSocketTrait = Box<dyn AsyncWebSocketTrait>;
7
8/// Internal WebSocket connection type.
9///
10/// Wraps the WebSocket connection in an Arc<AsyncMutex> for thread-safe sharing.
11pub(crate) type WebSocketConnection = Arc<AsyncMutex<Option<WebSocketConnectionType>>>;