#[non_exhaustive]pub struct WebSocketError(/* private fields */);Expand description
WebSocket transport error reported by the underlying WebSocket client.
As with HttpError, the inner third-party type is private and
diagnostics are exposed via accessor methods returning primitive types.
Implementations§
Source§impl WebSocketError
impl WebSocketError
Sourcepub fn is_connection_closed(&self) -> bool
pub fn is_connection_closed(&self) -> bool
true if the peer cleanly closed the connection.
Sourcepub fn is_already_closed(&self) -> bool
pub fn is_already_closed(&self) -> bool
true if the connection was already closed when the operation was
attempted (caller bug or race).
Sourcepub fn is_protocol(&self) -> bool
pub fn is_protocol(&self) -> bool
true if the error is a WebSocket protocol violation
(malformed frame, invalid opcode, etc.).
Sourcepub fn is_capacity(&self) -> bool
pub fn is_capacity(&self) -> bool
true if a frame or message exceeded a configured size limit.
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 StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for WebSocketError
impl !RefUnwindSafe for WebSocketError
impl Send for WebSocketError
impl Sync for WebSocketError
impl Unpin for WebSocketError
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.