Enum discord_sdk::error::DiscordApiErr
source · pub enum DiscordApiErr {
AlreadyConnectedToLobby,
AlreadyConnectingToLobby,
Unknown,
NoErrorData,
MalformedCommand,
Generic {
code: Option<u32>,
message: Option<String>,
},
InvalidLobbySecret,
InvalidCommand {
reason: String,
},
}
Expand description
An actual API error event sent from Discord. This list is currently incomplete and may change at any time as it is not a documented part of the public API of Discord, eg. the Game SDK uses a simplified version that collapses a wider range of errors into simpler categories
Variants§
AlreadyConnectedToLobby
AlreadyConnectingToLobby
Unknown
NoErrorData
MalformedCommand
Generic
InvalidLobbySecret
InvalidCommand
Trait Implementations§
source§impl Debug for DiscordApiErr
impl Debug for DiscordApiErr
source§impl Display for DiscordApiErr
impl Display for DiscordApiErr
source§impl Error for DiscordApiErr
impl Error for DiscordApiErr
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<DiscordApiErr> for DiscordErr
impl From<DiscordApiErr> for DiscordErr
source§fn from(source: DiscordApiErr) -> Self
fn from(source: DiscordApiErr) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for DiscordApiErr
impl Send for DiscordApiErr
impl Sync for DiscordApiErr
impl Unpin for DiscordApiErr
impl UnwindSafe for DiscordApiErr
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