cross-ws 0.3.2

cross-ws is a web and native stream based WebSocket client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! nash-ws error module.

/// Specific error to each backend.
pub use crate::backend::BackendError;

/// All possible errors emitted by the WebSocket.
#[derive(Debug)]
pub enum Error {
    /// Error emitted if the connection fails.
    ConnectionError(BackendError),
    /// Error emitted if sending a message fails.
    SendError(BackendError),
    /// Error emitted if receiving a message fails.
    ReceiveError(BackendError)
}

/// Result type of nash-ws.
pub type WebsocketResult<T> = Result<T, Error>;