[][src]Enum websockets::WebSocketError

pub enum WebSocketError {
    TcpConnectionError(IoError),
    TlsConnectionError(NativeTlsError),
    WebSocketClosedError,
    ShutdownError(IoError),
    InvalidHandshakeError,
    HandshakeFailedError {
        status_code: String,
        headers: Vec<(String, String)>,
        body: Option<String>,
    },
    ControlFrameTooLargeError,
    PayloadTooLargeError,
    InvalidFrameError,
    ReceivedMaskedFrameError,
    ParseError(ParseError),
    SchemeError,
    HostError,
    PortError,
    SocketAddrError(IoError),
    ResolutionError,
    ReadError(IoError),
    WriteError(IoError),
}

The possible error types from the WebSocket connection.

Variants

TcpConnectionError(IoError)

Error connecting using TCP

TlsConnectionError(NativeTlsError)

Error connecting using TLS

WebSocketClosedError

Attempted to use the WebSocket when it is already closed

ShutdownError(IoError)

Error shutting down the internal stream

InvalidHandshakeError

Invalid handshake response from the server

HandshakeFailedError

The server rejected the handshake request

Fields of HandshakeFailedError

status_code: String

Status code from the server's handshake response

headers: Vec<(String, String)>

Headers from the server's handshake response

body: Option<String>

Body of the server's handshake response, if any

ControlFrameTooLargeError

Attempted to use a control frame whose payload is more than 125 bytes

PayloadTooLargeError

Attempted to use a frame whose payload is too large

InvalidFrameError

Received an invalid frame

ReceivedMaskedFrameError

Received a masked frame from the server

ParseError(ParseError)

URL could not be parsed

SchemeError

URL has invalid WebSocket scheme (use "ws" or "wss")

HostError

URL host is invalid or missing

PortError

URL port is invalid

SocketAddrError(IoError)

Could not parse URL into SocketAddrs

ResolutionError

Could not resolve the URL's domain

ReadError(IoError)

Error reading from WebSocket

WriteError(IoError)

Error writing to WebSocket

Trait Implementations

impl Debug for WebSocketError[src]

impl Display for WebSocketError[src]

impl Error for WebSocketError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,