Enum websocket::WebSocketError
source · [−]pub enum WebSocketError {
ProtocolError(&'static str),
DataFrameError(&'static str),
NoDataAvailable,
IoError(Error),
Utf8Error(Utf8Error),
Other(Box<dyn Error + Sync + Send + 'static, Global>),
}
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 + Sync + Send + 'static, Global>)
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
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourcepub fn cause(&self) -> Option<&dyn Error>
pub fn cause(&self) -> Option<&dyn Error>
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
sourceimpl From<Error> for WebSocketError
impl From<Error> for WebSocketError
sourcepub fn from(err: Error) -> WebSocketError
pub fn from(err: Error) -> WebSocketError
Performs the conversion.
sourceimpl From<Utf8Error> for WebSocketError
impl From<Utf8Error> for WebSocketError
sourcepub fn from(err: Utf8Error) -> WebSocketError
pub fn from(err: Utf8Error) -> WebSocketError
Performs the conversion.
sourceimpl From<WebSocketOtherError> for WebSocketError
impl From<WebSocketOtherError> for WebSocketError
sourcefn from(e: WebSocketOtherError) -> WebSocketError
fn from(e: WebSocketOtherError) -> WebSocketError
Performs the conversion.
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more