pub enum WebSocketError {
ConnectionFailed(String),
ConnectionClosed,
SendFailed(String),
ReceiveFailed(String),
SerializationFailed(String),
DeserializationFailed(String),
RoomNotFound(String),
ConnectionNotFound(String),
MaxConnectionsExceeded(u32),
Timeout(String),
Internal(String),
}Expand description
WebSocket 错误类型
Variants§
ConnectionFailed(String)
连接失败
ConnectionClosed
连接已关闭
SendFailed(String)
发送消息失败
ReceiveFailed(String)
接收消息失败
SerializationFailed(String)
序列化失败
DeserializationFailed(String)
反序列化失败
RoomNotFound(String)
房间不存在
ConnectionNotFound(String)
连接不存在
MaxConnectionsExceeded(u32)
连接数超限
Timeout(String)
操作超时
Internal(String)
服务内部错误
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()
Auto Trait Implementations§
impl Freeze for WebSocketError
impl RefUnwindSafe for WebSocketError
impl Send for WebSocketError
impl Sync for WebSocketError
impl Unpin for WebSocketError
impl UnsafeUnpin 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