Enum websocket::WebSocketError
source · pub enum WebSocketError {
ProtocolError(&'static str),
DataFrameError(&'static str),
NoDataAvailable,
IoError(Error),
Utf8Error(Utf8Error),
Other(Box<dyn Error + Send + Sync>),
}
Expand description
Represents a WebSocket error
Variants§
ProtocolError(&'static str)
A WebSocket protocol error
DataFrameError(&'static str)
Invalid WebSocket data frame error
NoDataAvailable
No data available
IoError(Error)
An input/output error
Utf8Error(Utf8Error)
A UTF-8 error
Other(Box<dyn Error + Send + Sync>)
Other error from higher-level crate, for downcasting
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
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for WebSocketError
impl From<Error> for WebSocketError
source§fn from(err: Error) -> WebSocketError
fn from(err: Error) -> WebSocketError
Converts to this type from the input type.
source§impl From<Utf8Error> for WebSocketError
impl From<Utf8Error> for WebSocketError
source§fn from(err: Utf8Error) -> WebSocketError
fn from(err: Utf8Error) -> WebSocketError
Converts to this type from the input type.
source§impl From<WebSocketOtherError> for WebSocketError
impl From<WebSocketOtherError> for WebSocketError
source§fn from(e: WebSocketOtherError) -> WebSocketError
fn from(e: WebSocketOtherError) -> WebSocketError
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 !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