pub enum WebsocketError {
Upgrade(Box<dyn Error + Send + Sync>),
MessageReceive(Box<dyn Error + Send + Sync>),
ReadyStatus(Box<dyn Error + Send + Sync>),
MessageSend(Box<dyn Error + Send + Sync>),
MessageFlush(Box<dyn Error + Send + Sync>),
DecodeText(Box<dyn Error + Send + Sync>),
DecodeJson(Box<dyn Error + Send + Sync>),
EncodeJson(Box<dyn Error + Send + Sync>),
WebSocketClose(Box<dyn Error + Send + Sync>),
// some variants omitted
}
Expand description
A set of errors that can occur during handling the websocket connections and in other operations.
Variants§
Upgrade(Box<dyn Error + Send + Sync>)
Websocket upgrade error.
MessageReceive(Box<dyn Error + Send + Sync>)
Failed to receive a message from the websocket connection.
ReadyStatus(Box<dyn Error + Send + Sync>)
Failed to check websocket’s ready status to send messages.
MessageSend(Box<dyn Error + Send + Sync>)
Failed to send a message to the websocket connection.
MessageFlush(Box<dyn Error + Send + Sync>)
Failed to flush messages to the websocket connection.
DecodeText(Box<dyn Error + Send + Sync>)
Failed to decode message data as text.
DecodeJson(Box<dyn Error + Send + Sync>)
Failed to decode the message data as JSON
in message.decode_json()
method.
EncodeJson(Box<dyn Error + Send + Sync>)
Failed to convert a struct to JSON
in message.json()
method.
WebSocketClose(Box<dyn Error + Send + Sync>)
Failed to close the websocket connection.
Trait Implementations§
Source§impl Debug for WebsocketError
impl Debug for WebsocketError
Source§impl Display for WebsocketError
impl Display for WebsocketError
Source§impl Error for WebsocketError
impl Error for WebsocketError
1.30.0 · 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 PartialEq for WebsocketError
impl PartialEq for WebsocketError
impl Eq for WebsocketError
Auto Trait Implementations§
impl Freeze for WebsocketError
impl !RefUnwindSafe for WebsocketError
impl Send for WebsocketError
impl Sync for WebsocketError
impl Unpin for WebsocketError
impl !UnwindSafe for WebsocketError
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