[][src]Enum panda::PandaError

pub enum PandaError {
    AuthenticationFailed,
    CantConnectToGateway,
    ConnectionClosed,
    UnknownPayloadReceived,
    UnknownOpcodeSent,
    InvalidDecodeSent,
    InvalidPayloadFormat(&'static str),
    UnexpectedPayloadReceived,
    WrongCompression,
    HttpNoResponse,
    HttpImproperlyFormatted,
    HttpUnauthorized,
    HttpForbidden,
    HttpInvalidParameters,
    UnsuccessfulConnectionClose,
    InvalidShard,
    ShardingRequired,
    InvalidApiGatewayVersion,
    SerdeError(Error),
    TungsteniteError(TungsteniteError),
    RuntimeError,
}

The error enum for Panda

Variants

AuthenticationFailed

Returned when there was an authentication error and the gateway is closed

CantConnectToGateway

Returned when "discord" fails to connect to the gateway, it can only be returned at the first connection, all reconnections are handled by "discord"

ConnectionClosed

Returned when the gateway connection is unexpected closed

UnknownPayloadReceived

Returned when "discord" receives a unknown message format

UnknownOpcodeSent

Returned when panda sent an invalid Opcode

InvalidDecodeSent

Returned when panda sent an invalid payload

InvalidPayloadFormat(&'static str)

Returned when panda recevies a invalid message format

UnexpectedPayloadReceived

Returned when "discord" receives a unexpected message format like IDENTIFY

WrongCompression

Returned when "discord" receives a not zlib compressed payload

HttpNoResponse

Returned when "discord" http client didn't receive a response of Discord API

HttpImproperlyFormatted

Returned when http request format was invalid

HttpUnauthorized

Returned when http request has an invalid token

HttpForbidden

Returned when the client doesn't have enough permissions

HttpInvalidParameters

Returned when the http request URL had invalid parameters, such as wrong {channel_id}

UnsuccessfulConnectionClose

Returned when the gateway couldn't close the connection succesfully

InvalidShard

Returned when you send an invalid shard

ShardingRequired

Returned when you handled too many guilds, and shard is necessary

InvalidApiGatewayVersion
SerdeError(Error)

serde_json

TungsteniteError(TungsteniteError)

tungstenite

RuntimeError

Trait Implementations

impl Debug for PandaError[src]

impl Display for PandaError[src]

impl Error for PandaError[src]

impl From<Error> for PandaError[src]

impl From<Error> for PandaError[src]

impl From<Error> for PandaError[src]

impl From<JoinError> for PandaError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]