#[non_exhaustive]pub enum RealtimeError {
Connect(String),
Protocol(String),
Json(Error),
}Expand description
Errors produced by the realtime WebSocket module.
Kept local to this module (rather than reusing the crate-wide
OpenAIError) so the realtime surface stays self-contained.
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.
Connect(String)
Failed to build the request or establish the WebSocket connection.
Protocol(String)
A WebSocket protocol-level failure while sending or receiving frames.
Json(Error)
Failed to (de)serialize a JSON event.
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()
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