Enum tungstenite::error::Error
source · pub enum Error {
ConnectionClosed(Option<CloseFrame<'static>>),
Io(Error),
Tls(Error),
Capacity(Cow<'static, str>),
Protocol(Cow<'static, str>),
SendQueueFull(Message),
Utf8,
Url(Cow<'static, str>),
Http(u16),
}
Expand description
Possible WebSocket errors
Variants
ConnectionClosed(Option<CloseFrame<'static>>)
WebSocket connection closed (normally)
Io(Error)
Input-output error
Tls(Error)
TLS error
Capacity(Cow<'static, str>)
Buffer capacity exhausted
Protocol(Cow<'static, str>)
Protocol violation
SendQueueFull(Message)
Message send queue full
Utf8
UTF coding error
Url(Cow<'static, str>)
Invlid URL.
Http(u16)
HTTP error.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · 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
sourceimpl<Role: HandshakeRole> From<Error> for HandshakeError<Role>
impl<Role: HandshakeRole> From<Error> for HandshakeError<Role>
sourceimpl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
sourcefn from(_: FromUtf8Error) -> Self
fn from(_: FromUtf8Error) -> Self
Converts to this type from the input type.
sourceimpl NonBlockingError for Error
impl NonBlockingError for Error
sourcefn into_non_blocking(self) -> Option<Self>
fn into_non_blocking(self) -> Option<Self>
Convert WouldBlock to None and don’t touch other errors.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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