Enum serenity::prelude::GatewayError [] [src]

pub enum GatewayError {
    BuildingUrl,
    Closed(Option<CloseData>),
    ExpectedHello,
    HeartbeatFailed,
    InvalidAuthentication,
    InvalidHandshake,
    InvalidOpCode,
    InvalidShardData,
    NoAuthentication,
    NoSessionId,
    OverloadedShard,
    ReconnectFailure,
}

An error that occurred while attempting to deal with the gateway.

Note that - from a user standpoint - there should be no situation in which you manually handle these.

Variants

There was an error building a URL.

The connection closed, potentially uncleanly.

Expected a Hello during a handshake

When there was an error sending a heartbeat.

When invalid authentication (a bad token) was sent in the IDENTIFY.

Expected a Ready or an InvalidateSession

An indicator that an unknown opcode was received from the gateway.

When invalid sharding data was sent in the IDENTIFY.

Examples

Sending a shard ID of 5 when sharding with 3 total is considered invalid.

When no authentication was sent in the IDENTIFY.

When a session Id was expected (for resuming), but was not present.

When a shard would have too many guilds assigned to it.

Examples

When sharding 5500 guilds on 2 shards, at least one of the shards will have over the maximum number of allowed guilds per shard.

This limit is currently 2500 guilds per shard.

Failed to reconnect after a number of attempts.

Trait Implementations

impl Clone for Error
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl StdError for Error
[src]

[src]

A short description of the error. Read more

1.0.0
[src]

The lower-level cause of this error, if any. Read more

impl From<GatewayError> for Error
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for GatewayError

impl Sync for GatewayError