Enum parity_ws::ErrorKind [−][src]
The type of an error, which may indicate other kinds of errors as the underlying cause.
Variants
Indicates an internal application error. If panic_on_internal is true, which is the default, then the application will panic. Otherwise the WebSocket will automatically attempt to send an Error (1011) close code.
Indicates a state where some size limit has been exceeded, such as an inability to accept any more new connections. If a Connection is active, the WebSocket will automatically attempt to send a Size (1009) close code.
Indicates a violation of the WebSocket protocol. The WebSocket will automatically attempt to send a Protocol (1002) close code, or if this error occurs during a handshake, an HTTP 400 response will be generated.
Encoding(Utf8Error)
Indicates that the WebSocket received data that should be utf8 encoded but was not. The WebSocket will automatically attempt to send a Invalid Frame Payload Data (1007) close code.
Io(Error)
Indicates an underlying IO Error. This kind of error will result in a WebSocket Connection disconnecting.
Http(Error)
Indicates a failure to parse an HTTP message. This kind of error should only occur during a WebSocket Handshake, and a HTTP 500 response will be generated.
Indicates a failure to send a signal on the internal EventLoop channel. This means that
the WebSocket is overloaded. In order to avoid this error, it is important to set
Settings::max_connections
and Settings:queue_size
high enough to handle the load.
If encountered, retuning from a handler method and waiting for the EventLoop to consume
the queue may relieve the situation.
A custom error kind for use by applications. This error kind involves extra overhead because it will allocate the memory on the heap. The WebSocket ignores such errors by default, simply passing them to the Connection Handler.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl !UnwindSafe for Kind
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,