#[non_exhaustive]pub enum RealtimeError {
InvalidUrl {
url: String,
message: String,
},
WebSocket(Box<Error>),
InvalidHeaderValue {
field: &'static str,
},
Protocol(DecodeError),
MissingResult,
UnexpectedResult {
method: &'static str,
expected: &'static str,
actual: &'static str,
},
Timeout {
operation: &'static str,
timeout: Duration,
},
ConnectionError {
reason: i32,
reason_name: String,
friendly: String,
},
ConnectionClosed,
RpcError {
code: i32,
error_code: i32,
error_name: String,
message: String,
friendly: String,
},
}Expand description
Error returned by realtime connection and RPC operations.
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.
InvalidUrl
Invalid realtime WebSocket URL supplied to a realtime client builder.
Fields
WebSocket(Box<Error>)
WebSocket transport error.
InvalidHeaderValue
A validated client identity could not be represented as a realtime header.
Protocol(DecodeError)
Protobuf decode error for a server message.
MissingResult
The server returned an RPC result envelope without a result body.
UnexpectedResult
The server returned a result oneof that does not match the requested method.
Fields
Timeout
A realtime operation exceeded its configured timeout.
ConnectionError
The realtime server rejected the connection.
Fields
ConnectionClosed
The realtime connection closed before the requested operation completed.
RpcError
The realtime server returned an RPC error for a request.
Trait Implementations§
Source§impl Debug for RealtimeError
impl Debug for RealtimeError
Source§impl Display for RealtimeError
impl Display for RealtimeError
Source§impl Error for RealtimeError
impl Error for RealtimeError
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<DecodeError> for RealtimeError
impl From<DecodeError> for RealtimeError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for RealtimeError
impl !UnwindSafe for RealtimeError
impl Freeze for RealtimeError
impl Send for RealtimeError
impl Sync for RealtimeError
impl Unpin for RealtimeError
impl UnsafeUnpin for RealtimeError
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