#[non_exhaustive]pub enum ConnectionError {
}Available on crate feature
driver only.Expand description
Errors encountered while connecting to a Discord voice server over the driver.
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.
AttemptDiscarded
The driver hung up an internal signaller, either due to another connection attempt or a crash.
Crypto(Error)
An error occurred during [en/de]cryption of voice packets.
CryptoInvalidLength
The symmetric key supplied by Discord had the wrong size.
CryptoModeInvalid
Server did not return the expected crypto mode during negotiation.
Selected crypto mode was not offered by server.
EndpointUrl
An indicator that an endpoint URL was invalid.
IllegalDiscoveryResponse
Discord failed to correctly respond to IP discovery.
IllegalIp
Could not parse Discord’s view of our IP.
Io(Error)
Miscellaneous I/O error.
Json(Error)
JSON (de)serialization error.
InterconnectFailure(Recipient)
Failed to message other background tasks after connection establishment.
Ws(Error)
Error communicating with gateway server over WebSocket.
TimedOut
Connection attempt timed out.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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 DisconnectReason
impl From<&Error> for DisconnectReason
Source§fn from(e: &ConnectionError) -> Self
fn from(e: &ConnectionError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(e: CryptoError) -> Self
fn from(e: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for JoinError
Available on crate feature gateway only.
impl From<Error> for JoinError
Available on crate feature
gateway only.Source§fn from(e: ConnectionError) -> Self
fn from(e: ConnectionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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