Enum serenity::client::bridge::gateway::ShardRunnerMessage[][src]

pub enum ShardRunnerMessage {
    ChunkGuild {
        guild_id: GuildId,
        limit: Option<u16>,
        filter: ChunkGuildFilter,
        nonce: Option<String>,
    },
    Close(u16Option<String>),
    Message(Message),
    SetActivity(Option<Activity>),
    SetPresence(OnlineStatusOption<Activity>),
    SetStatus(OnlineStatus),
}
Expand description

A message to send from a shard over a WebSocket.

Variants

ChunkGuild

Fields

guild_id: GuildId

The IDs of the Guild to chunk.

limit: Option<u16>

The maximum number of members to receive GuildMembersChunkEvents for.

filter: ChunkGuildFilter

A filter to apply to the returned members.

nonce: Option<String>

Optional nonce to identify GuildMembersChunkEvent responses.

Indicates that the client is to send a member chunk message.

Close(u16Option<String>)

Tuple Fields

0: u16

Indicates that the client is to close with the given status code and reason.

You should rarely - if ever - need this, but the option is available. Prefer to use the ShardManager to shutdown WebSocket clients if you are intending to send a 1000 close code.

Message(Message)

Tuple Fields

Indicates that the client is to send a custom WebSocket message.

SetActivity(Option<Activity>)

Tuple Fields

Indicates that the client is to update the shard’s presence’s activity.

SetPresence(OnlineStatusOption<Activity>)

Tuple Fields

Indicates that the client is to update the shard’s presence in its entirity.

SetStatus(OnlineStatus)

Tuple Fields

Indicates that the client is to update the shard’s presence’s status.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more