Enum serenity::http::routing::Route[][src]

#[non_exhaustive]
pub enum Route {
Show 75 variants ChannelsId(u64), ChannelsIdInvites(u64), ChannelsIdMessages(u64), ChannelsIdMessagesBulkDelete(u64), ChannelsIdMessagesId(LightMethod, u64), ChannelsIdMessagesIdAck(u64), ChannelsIdMessagesIdReactions(u64), ChannelsIdMessagesIdReactionsUserIdType(u64), ChannelsIdPermissionsOverwriteId(u64), ChannelsIdPins(u64), ChannelsIdPinsMessageId(u64), ChannelsIdCrosspostsMessageId(u64), ChannelsIdTyping(u64), ChannelsIdWebhooks(u64), ChannelsIdMessagesIdThreads(u64), ChannelsIdThreads(u64), ChannelsIdThreadMembersMe(u64), ChannelsIdThreadMembersUserId(u64), ChannelsIdThreadMembers(u64), ChannelsIdActiveThreads(u64), ChannelsIdArchivedPublicThreads(u64), ChannelsIdArchivedPrivateThreads(u64), ChannelsIdMeJoindedArchivedPrivateThreads(u64), Gateway, GatewayBot, Guilds, GuildsId(u64), GuildsIdBans(u64), GuildsIdAuditLogs(u64), GuildsIdBansUserId(u64), GuildsIdChannels(u64), GuildsIdWidget(u64), GuildsIdPreview(u64), GuildsIdEmojis(u64), GuildsIdEmojisId(u64), GuildsIdIntegrations(u64), GuildsIdIntegrationsId(u64), GuildsIdIntegrationsIdSync(u64), GuildsIdInvites(u64), GuildsIdMembers(u64), GuildsIdMembersId(u64), GuildsIdMembersIdRolesId(u64), GuildsIdMembersMe(u64), GuildsIdMembersMeNick(u64), GuildsIdMembersSearch(u64), GuildsIdPrune(u64), GuildsIdRegions(u64), GuildsIdRoles(u64), GuildsIdRolesId(u64), GuildsIdVanityUrl(u64), GuildsIdVoiceStates(u64), GuildsIdVoiceStatesMe(u64), GuildsIdWebhooks(u64), GuildsIdWelcomeScreen(u64), InvitesCode, UsersId, UsersMe, UsersMeChannels, UsersMeConnections, UsersMeGuilds, UsersMeGuildsId, VoiceRegions, WebhooksId(u64), WebhooksIdMessagesId(u64), WebhooksApplicationId(u64), InteractionsId(u64), ApplicationsIdCommands(u64), ApplicationsIdCommandsId(u64), ApplicationsIdGuildsIdCommands(u64), ApplicationsIdGuildsIdCommandsPermissions(u64), ApplicationsIdGuildsIdCommandIdPermissions(u64), ApplicationsIdGuildsIdCommandsId(u64), StageInstances, StageInstancesChannelId(u64), None,
}
Expand description

A representation of all routes registered within the library. These are safe and memory-efficient representations of each path that functions exist for in the http module.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ChannelsId

Route for the /channels/:channel_id path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsId

0: u64
ChannelsIdInvites

Route for the /channels/:channel_id/invites path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdInvites

0: u64
ChannelsIdMessages

Route for the /channels/:channel_id/messages path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessages

0: u64
ChannelsIdMessagesBulkDelete

Route for the /channels/:channel_id/messages/bulk-delete path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessagesBulkDelete

0: u64
ChannelsIdMessagesId

Route for the /channels/:channel_id/messages/:message_id path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessagesId

0: LightMethod1: u64
ChannelsIdMessagesIdAck

Route for the /channels/:channel_id/messages/:message_id/ack path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessagesIdAck

0: u64
ChannelsIdMessagesIdReactions

Route for the /channels/:channel_id/messages/:message_id/reactions path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessagesIdReactions

0: u64
ChannelsIdMessagesIdReactionsUserIdType

Route for the /channels/:channel_id/messages/:message_id/reactions/:reaction/@me path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessagesIdReactionsUserIdType

0: u64
ChannelsIdPermissionsOverwriteId

Route for the /channels/:channel_id/permissions/:target_id path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdPermissionsOverwriteId

0: u64
ChannelsIdPins

Route for the /channels/:channel_id/pins path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdPins

0: u64
ChannelsIdPinsMessageId

Route for the /channels/:channel_id/pins/:message_id path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdPinsMessageId

0: u64
ChannelsIdCrosspostsMessageId

Route for the /channels/:channel_id/message/:message_id/crosspost path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdCrosspostsMessageId

0: u64
ChannelsIdTyping

Route for the /channels/:channel_id/typing path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdTyping

0: u64
ChannelsIdWebhooks

Route for the /channels/:channel_id/webhooks path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdWebhooks

0: u64
ChannelsIdMessagesIdThreads

Route for the /channels/:channel_id/messages/:message_id/threads path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMessagesIdThreads

0: u64
ChannelsIdThreads

Route for the /channels/:channel_id/threads path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdThreads

0: u64
ChannelsIdThreadMembersMe

Route for the /channels/:channel_id/thread-members/@me path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdThreadMembersMe

0: u64
ChannelsIdThreadMembersUserId

Route for the /channels/:channel_id/thread-members/:user_id path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdThreadMembersUserId

0: u64
ChannelsIdThreadMembers

Route for the /channels/channel_id/thread-members path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdThreadMembers

0: u64
ChannelsIdActiveThreads

Route for the /channels/:channel_id/threads/active path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdActiveThreads

0: u64
ChannelsIdArchivedPublicThreads

Route for the /channels/:channel_id/threads/archived/public path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdArchivedPublicThreads

0: u64
ChannelsIdArchivedPrivateThreads

Route for the /channels/:channel_id/threads/archived/private path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdArchivedPrivateThreads

0: u64
ChannelsIdMeJoindedArchivedPrivateThreads

Route for the /channels/:channel_id/users/@me/threads/archived/private path.

The data is the relevant ChannelId.

Tuple Fields of ChannelsIdMeJoindedArchivedPrivateThreads

0: u64
Gateway

Route for the /gateway path.

GatewayBot

Route for the /gateway/bot path.

Guilds

Route for the /guilds path.

GuildsId

Route for the /guilds/:guild_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsId

0: u64
GuildsIdBans

Route for the /guilds/:guild_id/bans path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdBans

0: u64
GuildsIdAuditLogs

Route for the /guilds/:guild_id/audit-logs path. The data is the relevant GuildId.

Tuple Fields of GuildsIdAuditLogs

0: u64
GuildsIdBansUserId

Route for the /guilds/:guild_id/bans/:user_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdBansUserId

0: u64
GuildsIdChannels

Route for the /guilds/:guild_id/channels/:channel_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdChannels

0: u64
GuildsIdWidget

Route for the /guilds/:guild_id/widget path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdWidget

0: u64
GuildsIdPreview

Route for the /guilds/:guild_id/preview path.

The data is the relevant GuildPreview.

Tuple Fields of GuildsIdPreview

0: u64
GuildsIdEmojis

Route for the /guilds/:guild_id/emojis path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdEmojis

0: u64
GuildsIdEmojisId

Route for the /guilds/:guild_id/emojis/:emoji_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdEmojisId

0: u64
GuildsIdIntegrations

Route for the /guilds/:guild_id/integrations path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdIntegrations

0: u64
GuildsIdIntegrationsId

Route for the /guilds/:guild_id/integrations/:integration_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdIntegrationsId

0: u64
GuildsIdIntegrationsIdSync

Route for the /guilds/:guild_id/integrations/:integration_id/sync path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdIntegrationsIdSync

0: u64
GuildsIdInvites

Route for the /guilds/:guild_id/invites path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdInvites

0: u64
GuildsIdMembers

Route for the /guilds/:guild_id/members path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdMembers

0: u64
GuildsIdMembersId

Route for the /guilds/:guild_id/members/:user_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdMembersId

0: u64
GuildsIdMembersIdRolesId

Route for the /guilds/:guild_id/members/:user_id/roles/:role_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdMembersIdRolesId

0: u64
GuildsIdMembersMe

Route for the /guilds/:guild_id/members/@me path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdMembersMe

0: u64
GuildsIdMembersMeNick

Route for the /guilds/:guild_id/members/@me/nick path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdMembersMeNick

0: u64
GuildsIdMembersSearch

Route for the /guilds/:guild_id/members/search path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdMembersSearch

0: u64
GuildsIdPrune

Route for the /guilds/:guild_id/prune path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdPrune

0: u64
GuildsIdRegions

Route for the /guilds/:guild_id/regions path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdRegions

0: u64
GuildsIdRoles

Route for the /guilds/:guild_id/roles path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdRoles

0: u64
GuildsIdRolesId

Route for the /guilds/:guild_id/roles/:role_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdRolesId

0: u64
GuildsIdVanityUrl

Route for the /guilds/:guild_id/vanity-url path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdVanityUrl

0: u64
GuildsIdVoiceStates

Route for the /guilds/:guild_id/voice-states/:user_id path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdVoiceStates

0: u64
GuildsIdVoiceStatesMe

Route for the /guilds/:guild_id/voice-states/@me path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdVoiceStatesMe

0: u64
GuildsIdWebhooks

Route for the /guilds/:guild_id/webhooks path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdWebhooks

0: u64
GuildsIdWelcomeScreen

Route for the /guilds/:guild_id/welcome-screen path.

The data is the relevant GuildId.

Tuple Fields of GuildsIdWelcomeScreen

0: u64
InvitesCode

Route for the /invites/:code path.

UsersId

Route for the /users/:user_id path.

UsersMe

Route for the /users/@me path.

UsersMeChannels

Route for the /users/@me/channels path.

UsersMeConnections

Route for the /users/@me/connections path.

UsersMeGuilds

Route for the /users/@me/guilds path.

UsersMeGuildsId

Route for the /users/@me/guilds/:guild_id path.

VoiceRegions

Route for the /voice/regions path.

WebhooksId

Route for the /webhooks/:webhook_id path.

Tuple Fields of WebhooksId

0: u64
WebhooksIdMessagesId

Route for the /webhooks/:webhook_id/:token/messages/:message_id path.

The data is the relevant WebhookId.

Tuple Fields of WebhooksIdMessagesId

0: u64
WebhooksApplicationId
This is supported on crate feature unstable_discord_api only.

Route for the /webhooks/:application_id path.

The data is the relevant ApplicationId.

Tuple Fields of WebhooksApplicationId

0: u64
InteractionsId
This is supported on crate feature unstable_discord_api only.

Route for the /interactions/:interaction_id path.

The data is the relevant InteractionId.

Tuple Fields of InteractionsId

0: u64
ApplicationsIdCommands
This is supported on crate feature unstable_discord_api only.

Route for the /applications/:application_id path.

The data is the relevant ApplicationId.

Tuple Fields of ApplicationsIdCommands

0: u64
ApplicationsIdCommandsId
This is supported on crate feature unstable_discord_api only.

Route for the /applications/:application_id/commands/:command_id path.

The data is the relevant ApplicationId.

Tuple Fields of ApplicationsIdCommandsId

0: u64
ApplicationsIdGuildsIdCommands
This is supported on crate feature unstable_discord_api only.

Route for the /applications/:application_id/guilds/:guild_id path.

The data is the relevant ApplicationId.

Tuple Fields of ApplicationsIdGuildsIdCommands

0: u64
ApplicationsIdGuildsIdCommandsPermissions
This is supported on crate feature unstable_discord_api only.

Route for the /applications/:application_id/guilds/:guild_id/commands/permissions path.

The data is the relevant ApplicationId.

Tuple Fields of ApplicationsIdGuildsIdCommandsPermissions

0: u64
ApplicationsIdGuildsIdCommandIdPermissions
This is supported on crate feature unstable_discord_api only.

Route for the /applications/:application_id/guilds/:guild_id/commands/:command_id/permissions path.

The data is the relevant ApplicationId.

Tuple Fields of ApplicationsIdGuildsIdCommandIdPermissions

0: u64
ApplicationsIdGuildsIdCommandsId
This is supported on crate feature unstable_discord_api only.

Route for the /applications/:application_id/guilds/:guild_id path.

The data is the relevant ApplicationId.

Tuple Fields of ApplicationsIdGuildsIdCommandsId

0: u64
StageInstances

Route for the /stage-instances path.

The data is the relevant ChannelId.

StageInstancesChannelId

Route for the /stage-instances/:channel_id path.

The data is the relevant ChannelId.

Tuple Fields of StageInstancesChannelId

0: u64
None

Route where no ratelimit headers are in place (i.e. user account-only routes).

This is a special case, in that if the route is None then pre- and post-hooks are not executed.

Implementations

This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.
This is supported on crate feature unstable_discord_api only.

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

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Compare self to key and return true if they are equal.

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)

recently added

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.