vigoo/openapi_client_runtime/ws does not have a README file

    WebSocketDialer

    pub(open) trait WebSocketDialer {
    async fn dial(Self, url~ : String, headers~ :
    Headers
    , protocols~ : Array[String]) -> &WsConn raise WsError
    }

    Opens a WebSocket connection for OpenAPI 101 Switching Protocols operations. Implement this trait to plug in any platform-specific WebSocket stack (including custom Wasm host functions).

    WsConn

    pub(open) trait WsConn {
    async fn send(Self, WsMessage) -> Unit raise WsError
    async fn recv(Self) -> WsMessage? raise WsError
    async fn close(Self, code~ : UInt16, reason~ : String) -> Unit raise WsError
    }

    An open bidirectional WebSocket connection.

    WsError

    pub(all) suberror WsError {
    ConnectFailed(String)
    Protocol(String)
    Closed(code~ : UInt16, reason~ : String)
    Io(String)
    Cancelled
    } derive(Eq,
    Debug
    )

    Why a WebSocket dial, send, receive, or close operation failed.

    WsMessage

    pub(all) enum WsMessage {
    Text(String)
    Binary(Bytes)
    } derive(Eq,
    Debug
    )

    A WebSocket application data frame (UTF-8 text or raw binary).

    Source Files