pub enum SignalFishError {
TransportSend(String),
TransportReceive(String),
TransportClosed,
Serialization(Error),
NotConnected,
NotInRoom,
ServerError {
message: String,
error_code: Option<ErrorCode>,
},
Timeout,
Io(Error),
}Expand description
Errors that can occur when using the Signal Fish client.
Variants§
TransportSend(String)
Failed to send a message through the transport.
TransportReceive(String)
Failed to receive a message from the transport.
TransportClosed
The transport connection was closed unexpectedly.
Serialization(Error)
Failed to serialize or deserialize a protocol message.
NotConnected
Attempted an operation that requires an active connection, but the client is not connected.
NotInRoom
Attempted a room operation but the client is not in a room.
ServerError
The server returned an error message.
Fields
Timeout
An operation timed out.
Io(Error)
An I/O error occurred.
Trait Implementations§
Source§impl Debug for SignalFishError
impl Debug for SignalFishError
Source§impl Display for SignalFishError
impl Display for SignalFishError
Source§impl Error for SignalFishError
impl Error for SignalFishError
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<Error> for SignalFishError
impl From<Error> for SignalFishError
Auto Trait Implementations§
impl Freeze for SignalFishError
impl !RefUnwindSafe for SignalFishError
impl Send for SignalFishError
impl Sync for SignalFishError
impl Unpin for SignalFishError
impl UnsafeUnpin for SignalFishError
impl !UnwindSafe for SignalFishError
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