pub enum WebSocketError {
Connection(String),
Send(String),
Receive(String),
Protocol(String),
Internal(String),
Timeout(Duration),
ReconnectFailed(u32),
BinaryPayload(String),
HeartbeatTimeout(Duration),
SlowConsumer(Duration),
}Variants§
Connection(String)
Send(String)
Receive(String)
Protocol(String)
Internal(String)
Timeout(Duration)
ReconnectFailed(u32)
BinaryPayload(String)
HeartbeatTimeout(Duration)
SlowConsumer(Duration)
Implementations§
Source§impl WebSocketError
impl WebSocketError
Sourcepub fn client_message(&self) -> &'static str
pub fn client_message(&self) -> &'static str
Returns a sanitized error message safe for client-facing communication.
Internal details (buffer sizes, queue depths, connection state, type names) are stripped to prevent information leakage.
Sourcepub fn internal_detail(&self) -> String
pub fn internal_detail(&self) -> String
Returns the internal detail message for logging purposes.
This MUST NOT be sent to clients as it may contain sensitive internal state information.
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 From<WebSocketError> for RoomError
impl From<WebSocketError> for RoomError
Source§fn from(source: WebSocketError) -> Self
fn from(source: WebSocketError) -> Self
Converts to this type from the input type.
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