Enum websocket_base::result::WebSocketError
source · [−]pub enum WebSocketError {
ProtocolError(&'static str),
DataFrameError(&'static str),
NoDataAvailable,
IoError(Error),
Utf8Error(Utf8Error),
Other(Box<dyn Error + Send + Sync + 'static>),
}
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 + 'static>)
Other error from higher-level crate, for downcasting
Trait Implementations
sourceimpl Debug for WebSocketError
impl Debug for WebSocketError
sourceimpl Display for WebSocketError
impl Display for WebSocketError
sourceimpl Error for WebSocketError
impl Error for WebSocketError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<Error> for WebSocketError
impl From<Error> for WebSocketError
sourcefn from(err: Error) -> WebSocketError
fn from(err: Error) -> WebSocketError
Converts to this type from the input type.
sourceimpl From<Utf8Error> for WebSocketError
impl From<Utf8Error> for WebSocketError
sourcefn from(err: Utf8Error) -> WebSocketError
fn from(err: Utf8Error) -> WebSocketError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for WebSocketError
impl Send for WebSocketError
impl Sync for WebSocketError
impl Unpin for WebSocketError
impl !UnwindSafe for WebSocketError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more