Enum serenity::client::bridge::gateway::ShardRunnerMessage [−][src]
pub enum ShardRunnerMessage {
ChunkGuild {
guild_id: GuildId,
limit: Option<u16>,
filter: ChunkGuildFilter,
nonce: Option<String>,
},
Close(u16, Option<String>),
Message(Message),
SetActivity(Option<Activity>),
SetPresence(OnlineStatus, Option<Activity>),
SetStatus(OnlineStatus),
}
Expand description
A message to send from a shard over a WebSocket.
Variants
ChunkGuild
Fields
limit: Option<u16>
The maximum number of members to receive GuildMembersChunkEvent
s
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(u16, Option<String>)
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
0: Message
Indicates that the client is to send a custom WebSocket message.
SetActivity(Option<Activity>)
Indicates that the client is to update the shard’s presence’s activity.
SetPresence(OnlineStatus, Option<Activity>)
Indicates that the client is to update the shard’s presence in its entirity.
SetStatus(OnlineStatus)
Tuple Fields
0: OnlineStatus
Indicates that the client is to update the shard’s presence’s status.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ShardRunnerMessage
impl Send for ShardRunnerMessage
impl Sync for ShardRunnerMessage
impl Unpin for ShardRunnerMessage
impl UnwindSafe for ShardRunnerMessage
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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