#[non_exhaustive]pub enum ReceiveMessageErrorType {
Compression,
Deserializing {
event: String,
},
FatallyClosed {
close_code: CloseCode,
},
Io,
Process,
Reconnect,
SendingMessage,
}
Expand description
Type of ReceiveMessageError
that occurred.
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.
Compression
Available on crate features
zlib-stock
or zlib-simd
only.Binary message could not be decompressed.
The associated error downcasts to CompressionError
.
Deserializing
Gateway event could not be deserialized.
FatallyClosed
Shard has been closed due to a fatal configuration error.
Io
WebSocket connection error.
Process
Processing the message failed.
The associated error downcasts to ProcessError
.
Reconnect
Shard failed to reconnect to the gateway.
SendingMessage
Message could not be sent over the Websocket connection.
This may happen when the shard sends heartbeats or attempts to identify a new gateway session.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ReceiveMessageErrorType
impl Send for ReceiveMessageErrorType
impl Sync for ReceiveMessageErrorType
impl Unpin for ReceiveMessageErrorType
impl UnwindSafe for ReceiveMessageErrorType
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