Enum websocket::result::WebSocketError
source · pub enum WebSocketError {
Show 13 variants
ProtocolError(&'static str),
RequestError(&'static str),
ResponseError(&'static str),
DataFrameError(&'static str),
NoDataAvailable,
IoError(Error),
HttpError(HttpError),
UrlError(ParseError),
WebSocketUrlError(WSUrlErrorKind),
TlsError(TlsError),
TlsHandshakeFailure,
TlsHandshakeInterruption,
Utf8Error(Utf8Error),
}
Expand description
Represents a WebSocket error
Variants
ProtocolError(&'static str)
A WebSocket protocol error
RequestError(&'static str)
Invalid WebSocket request error
ResponseError(&'static str)
Invalid WebSocket response error
DataFrameError(&'static str)
Invalid WebSocket data frame error
NoDataAvailable
No data available
IoError(Error)
An input/output error
HttpError(HttpError)
An HTTP parsing error
UrlError(ParseError)
A URL parsing error
WebSocketUrlError(WSUrlErrorKind)
A WebSocket URL error
TlsError(TlsError)
An SSL error
TlsHandshakeFailure
an ssl handshake failure
TlsHandshakeInterruption
an ssl handshake interruption
Utf8Error(Utf8Error)
A UTF-8 error
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 description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn Error>
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
sourcefn from(err: Error) -> WebSocketError
fn from(err: Error) -> WebSocketError
Converts to this type from the input type.
sourceimpl From<Error> for WebSocketError
impl From<Error> for WebSocketError
sourcefn from(err: HttpError) -> WebSocketError
fn from(err: HttpError) -> WebSocketError
Converts to this type from the input type.
sourceimpl From<Error> for WebSocketError
impl From<Error> for WebSocketError
sourcefn from(err: TlsError) -> WebSocketError
fn from(err: TlsError) -> WebSocketError
Converts to this type from the input type.
sourceimpl<T> From<HandshakeError<T>> for WebSocketError
impl<T> From<HandshakeError<T>> for WebSocketError
sourcefn from(err: TlsHandshakeError<T>) -> WebSocketError
fn from(err: TlsHandshakeError<T>) -> WebSocketError
Converts to this type from the input type.
sourceimpl From<HttpCodecError> for WebSocketError
impl From<HttpCodecError> for WebSocketError
sourcefn from(src: HttpCodecError) -> Self
fn from(src: HttpCodecError) -> Self
Converts to this type from the input type.
sourceimpl From<HyperIntoWsError> for WebSocketError
impl From<HyperIntoWsError> for WebSocketError
sourcefn from(err: HyperIntoWsError) -> WebSocketError
fn from(err: HyperIntoWsError) -> WebSocketError
Converts to this type from the input type.
sourceimpl From<ParseError> for WebSocketError
impl From<ParseError> for WebSocketError
sourcefn from(err: ParseError) -> WebSocketError
fn from(err: ParseError) -> 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.
sourceimpl From<WSUrlErrorKind> for WebSocketError
impl From<WSUrlErrorKind> for WebSocketError
sourcefn from(err: WSUrlErrorKind) -> WebSocketError
fn from(err: WSUrlErrorKind) -> 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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