#[non_exhaustive]pub enum RealtimeErrorKind {
WebSocket {
source: Error,
},
Protocol(String),
Timeout {
operation: &'static str,
},
Closed,
}Expand description
Concrete error categories for the realtime (WebSocket) transport.
Kept separate from ZaiError so callers can introspect the failure mode
without matching on the full enum, and so the realtime module can construct
rich errors without touching HTTP-specific machinery.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WebSocket
Available on crate feature
realtime only.Low-level WebSocket error (connect/handshake/read/write). The original
tungstenite error is kept as the #[source] so the full chain
survives propagation. Only available with the realtime feature.
Protocol(String)
Protocol violation — unexpected or malformed server event.
Timeout
A realtime connect, write, or close operation exceeded its deadline.
Closed
The WebSocket session has been closed.
Trait Implementations§
Source§impl Debug for RealtimeErrorKind
impl Debug for RealtimeErrorKind
Source§impl Display for RealtimeErrorKind
impl Display for RealtimeErrorKind
Source§impl Error for RealtimeErrorKind
impl Error for RealtimeErrorKind
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + '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()
Source§impl From<RealtimeErrorKind> for ZaiError
Convert from a realtime transport error kind into a ZaiError.
impl From<RealtimeErrorKind> for ZaiError
Convert from a realtime transport error kind into a ZaiError.
Source§fn from(kind: RealtimeErrorKind) -> Self
fn from(kind: RealtimeErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for RealtimeErrorKind
impl !UnwindSafe for RealtimeErrorKind
impl Freeze for RealtimeErrorKind
impl Send for RealtimeErrorKind
impl Sync for RealtimeErrorKind
impl Unpin for RealtimeErrorKind
impl UnsafeUnpin for RealtimeErrorKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP