Enum tungstenite::error::ProtocolError[][src]

pub enum ProtocolError {
Show variants WrongHttpMethod, WrongHttpVersion, MissingConnectionUpgradeHeader, MissingUpgradeWebSocketHeader, MissingSecWebSocketVersionHeader, MissingSecWebSocketKey, SecWebSocketAcceptKeyMismatch, JunkAfterRequest, CustomResponseSuccessful, HandshakeIncomplete, HttparseError(Error), SendAfterClosing, ReceivedAfterClosing, NonZeroReservedBits, UnmaskedFrameFromClient, MaskedFrameFromServer, FragmentedControlFrame, ControlFrameTooBig, UnknownControlFrameType(u8), UnknownDataFrameType(u8), UnexpectedContinueFrame, ExpectedFragment(Data), ResetWithoutClosingHandshake, InvalidOpcode(u8), InvalidCloseSequence,
}

Indicates the specific type/cause of a protocol error.

Variants

WrongHttpMethod

Use of the wrong HTTP method (the WebSocket protocol requires the GET method be used).

WrongHttpVersion

Wrong HTTP version used (the WebSocket protocol requires version 1.1 or higher).

MissingConnectionUpgradeHeader

Missing Connection: upgrade HTTP header.

MissingUpgradeWebSocketHeader

Missing Upgrade: websocket HTTP header.

MissingSecWebSocketVersionHeader

Missing Sec-WebSocket-Version: 13 HTTP header.

MissingSecWebSocketKey

Missing Sec-WebSocket-Key HTTP header.

SecWebSocketAcceptKeyMismatch

The Sec-WebSocket-Accept header is either not present or does not specify the correct key value.

JunkAfterRequest

Garbage data encountered after client request.

CustomResponseSuccessful

Custom responses must be unsuccessful.

HandshakeIncomplete

No more data while still performing handshake.

HttparseError(Error)

Wrapper around a httparse::Error value.

SendAfterClosing

Not allowed to send after having sent a closing frame.

ReceivedAfterClosing

Remote sent data after sending a closing frame.

NonZeroReservedBits

Reserved bits in frame header are non-zero.

UnmaskedFrameFromClient

The server must close the connection when an unmasked frame is received.

MaskedFrameFromServer

The client must close the connection when a masked frame is received.

FragmentedControlFrame

Control frames must not be fragmented.

ControlFrameTooBig

Control frames must have a payload of 125 bytes or less.

UnknownControlFrameType(u8)

Type of control frame not recognised.

UnknownDataFrameType(u8)

Type of data frame not recognised.

UnexpectedContinueFrame

Received a continue frame despite there being nothing to continue.

ExpectedFragment(Data)

Received data while waiting for more fragments.

ResetWithoutClosingHandshake

Connection closed without performing the closing handshake.

InvalidOpcode(u8)

Encountered an invalid opcode.

InvalidCloseSequence

The payload for the closing frame is invalid.

Trait Implementations

impl Clone for ProtocolError[src]

impl Debug for ProtocolError[src]

impl Display for ProtocolError[src]

impl Error for ProtocolError[src]

impl From<Error> for ProtocolError[src]

impl PartialEq<ProtocolError> for ProtocolError[src]

impl Copy for ProtocolError[src]

impl Eq for ProtocolError[src]

impl StructuralEq for ProtocolError[src]

impl StructuralPartialEq for ProtocolError[src]

Auto Trait Implementations

impl RefUnwindSafe for ProtocolError

impl Send for ProtocolError

impl Sync for ProtocolError

impl Unpin for ProtocolError

impl UnwindSafe for ProtocolError

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[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>, 
[src]