pub enum WsError<E> {
Service(E),
KeepAlive,
ReadTimeout,
WriteTimeout,
Protocol(ProtocolError),
Handshake(HandshakeError),
Disconnected(Option<Error>),
}Expand description
Errors produced by a WebSocket dispatcher.
Variants§
Service(E)
Error returned by the frame service.
KeepAlive
The keep-alive timer expired.
ReadTimeout
Reading a frame timed out.
WriteTimeout
Write backpressure stayed enabled for longer than the write timeout.
Protocol(ProtocolError)
WebSocket protocol error.
Handshake(HandshakeError)
WebSocket opening-handshake error.
Disconnected(Option<Error>)
The peer disconnected.
Trait Implementations§
Source§impl<E> Error for WsError<E>
impl<E> Error for WsError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<E> From<HandshakeError> for WsError<E>
impl<E> From<HandshakeError> for WsError<E>
Source§fn from(source: HandshakeError) -> Self
fn from(source: HandshakeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> !RefUnwindSafe for WsError<E>
impl<E> !UnwindSafe for WsError<E>
impl<E> Freeze for WsError<E>where
E: Freeze,
impl<E> Send for WsError<E>where
E: Send,
impl<E> Sync for WsError<E>where
E: Sync,
impl<E> Unpin for WsError<E>where
E: Unpin,
impl<E> UnsafeUnpin for WsError<E>where
E: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more