#[non_exhaustive]pub enum RadionError {
Connection(String),
Server {
message: String,
code: Option<String>,
channel: Option<String>,
id: Option<String>,
},
Transport(String),
Decompression(String),
}Expand description
Every error surfaced by the Radion SDK.
Mirrors the TypeScript / Python error hierarchy: connection-lifecycle
misuse, server-reported error frames, and transport / parse failures.
Clone so errors can be fanned out over the lifecycle event stream.
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.
Connection(String)
The SDK was used in a way the connection lifecycle forbids — for example
subscribing after close, or
building a client without an API key.
Server
The server reported an error frame.
Fields
Transport(String)
The underlying WebSocket transport failed.
Decompression(String)
A compressed binary frame could not be inflated.
Trait Implementations§
Source§impl Clone for RadionError
impl Clone for RadionError
Source§fn clone(&self) -> RadionError
fn clone(&self) -> RadionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RadionError
impl Debug for RadionError
Source§impl Display for RadionError
impl Display for RadionError
Source§impl Error for RadionError
impl Error for RadionError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for RadionError
impl RefUnwindSafe for RadionError
impl Send for RadionError
impl Sync for RadionError
impl Unpin for RadionError
impl UnsafeUnpin for RadionError
impl UnwindSafe for RadionError
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