Enum twilight_http::routing::Path[][src]

#[non_exhaustive]
pub enum Path {
Show 63 variants ApplicationCommand(u64), ApplicationCommandId(u64), ApplicationGuildCommand(u64), ApplicationGuildCommandId(u64), ChannelsId(u64), ChannelsIdInvites(u64), ChannelsIdMessages(u64), ChannelsIdMessagesBulkDelete(u64), ChannelsIdMessagesId(Method, u64), ChannelsIdMessagesIdCrosspost(u64), ChannelsIdMessagesIdReactions(u64), ChannelsIdMessagesIdReactionsUserIdType(u64), ChannelsIdPermissionsOverwriteId(u64), ChannelsIdPins(u64), ChannelsIdPinsMessageId(u64), ChannelsIdRecipients(u64), ChannelsIdTyping(u64), ChannelsIdWebhooks(u64), ChannelsIdFollowers(u64), Gateway, GatewayBot, Guilds, GuildsId(u64), GuildsIdBans(u64), GuildsIdBansId(u64), GuildsIdAuditLogs(u64), GuildsIdBansUserId(u64), GuildsIdChannels(u64), GuildsIdWidget(u64), GuildsIdEmojis(u64), GuildsIdEmojisId(u64), GuildsIdIntegrations(u64), GuildsIdIntegrationsId(u64), GuildsIdIntegrationsIdSync(u64), GuildsIdInvites(u64), GuildsIdMembers(u64), GuildsIdMembersId(u64), GuildsIdMembersIdRolesId(u64), GuildsIdMembersMeNick(u64), GuildsIdMembersSearch(u64), GuildsIdPreview(u64), GuildsIdPrune(u64), GuildsIdRegions(u64), GuildsIdRoles(u64), GuildsIdRolesId(u64), GuildsIdTemplates(u64), GuildsIdTemplatesCode(u64), GuildsIdVanityUrl(u64), GuildsIdVoiceStates(u64), GuildsIdWelcomeScreen(u64), GuildsIdWebhooks(u64), InvitesCode, InteractionCallback(u64), StageInstances, UsersId, OauthApplicationsMe, UsersIdConnections, UsersIdChannels, UsersIdGuilds, UsersIdGuildsId, VoiceRegions, WebhooksIdTokenMessagesId(u64), WebhooksId(u64),
}
Expand description

An enum representing a path, most useful for ratelimiting implementations.

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.
ApplicationCommand

Operating on global commands.

Tuple Fields of ApplicationCommand

0: u64
ApplicationCommandId

Operating on a specific command.

Tuple Fields of ApplicationCommandId

0: u64
ApplicationGuildCommand

Operating on commands in a guild.

Tuple Fields of ApplicationGuildCommand

0: u64
ApplicationGuildCommandId

Operating on a specific command in a guild.

Tuple Fields of ApplicationGuildCommandId

0: u64
ChannelsId

Operating on a channel.

Tuple Fields of ChannelsId

0: u64
ChannelsIdInvites

Operating on a channel’s invites.

Tuple Fields of ChannelsIdInvites

0: u64
ChannelsIdMessages

Operating on a channel’s messages.

Tuple Fields of ChannelsIdMessages

0: u64
ChannelsIdMessagesBulkDelete

Operating on a channel’s messages by bulk deleting.

Tuple Fields of ChannelsIdMessagesBulkDelete

0: u64
ChannelsIdMessagesId

Operating on an individual channel’s message.

Tuple Fields of ChannelsIdMessagesId

0: Method1: u64
ChannelsIdMessagesIdCrosspost

Crossposting an individual channel’s message.

Tuple Fields of ChannelsIdMessagesIdCrosspost

0: u64
ChannelsIdMessagesIdReactions

Operating on an individual channel’s message’s reactions.

Tuple Fields of ChannelsIdMessagesIdReactions

0: u64
ChannelsIdMessagesIdReactionsUserIdType

Operating on an individual channel’s message’s reactions while specifying the user ID and emoji type.

Tuple Fields of ChannelsIdMessagesIdReactionsUserIdType

0: u64
ChannelsIdPermissionsOverwriteId

Operating on a channel’s permission overwrites by ID.

Tuple Fields of ChannelsIdPermissionsOverwriteId

0: u64
ChannelsIdPins

Operating on a channel’s pins.

Tuple Fields of ChannelsIdPins

0: u64
ChannelsIdPinsMessageId

Operating on a channel’s individual pinned message.

Tuple Fields of ChannelsIdPinsMessageId

0: u64
ChannelsIdRecipients

Operating on a group DM’s recipients.

Tuple Fields of ChannelsIdRecipients

0: u64
ChannelsIdTyping

Operating on a channel’s typing indicator.

Tuple Fields of ChannelsIdTyping

0: u64
ChannelsIdWebhooks

Operating on a channel’s webhooks.

Tuple Fields of ChannelsIdWebhooks

0: u64
ChannelsIdFollowers

Operating on a channel’s followers.

Tuple Fields of ChannelsIdFollowers

0: u64
Gateway

Operating with the gateway information.

GatewayBot

Operating with the gateway information tailored to the current user.

Guilds

Operating on the guild resource.

GuildsId

Operating on one of user’s guilds.

Tuple Fields of GuildsId

0: u64
GuildsIdBans

Tuple Fields of GuildsIdBans

0: u64
GuildsIdBansId

Tuple Fields of GuildsIdBansId

0: u64
GuildsIdAuditLogs

Tuple Fields of GuildsIdAuditLogs

0: u64
GuildsIdBansUserId

Tuple Fields of GuildsIdBansUserId

0: u64
GuildsIdChannels

Tuple Fields of GuildsIdChannels

0: u64
GuildsIdWidget

Tuple Fields of GuildsIdWidget

0: u64
GuildsIdEmojis

Tuple Fields of GuildsIdEmojis

0: u64
GuildsIdEmojisId

Tuple Fields of GuildsIdEmojisId

0: u64
GuildsIdIntegrations

Tuple Fields of GuildsIdIntegrations

0: u64
GuildsIdIntegrationsId

Tuple Fields of GuildsIdIntegrationsId

0: u64
GuildsIdIntegrationsIdSync

Tuple Fields of GuildsIdIntegrationsIdSync

0: u64
GuildsIdInvites

Tuple Fields of GuildsIdInvites

0: u64
GuildsIdMembers

Tuple Fields of GuildsIdMembers

0: u64
GuildsIdMembersId

Tuple Fields of GuildsIdMembersId

0: u64
GuildsIdMembersIdRolesId

Tuple Fields of GuildsIdMembersIdRolesId

0: u64
GuildsIdMembersMeNick

Tuple Fields of GuildsIdMembersMeNick

0: u64
GuildsIdMembersSearch

Tuple Fields of GuildsIdMembersSearch

0: u64
GuildsIdPreview

Tuple Fields of GuildsIdPreview

0: u64
GuildsIdPrune

Tuple Fields of GuildsIdPrune

0: u64
GuildsIdRegions

Tuple Fields of GuildsIdRegions

0: u64
GuildsIdRoles

Tuple Fields of GuildsIdRoles

0: u64
GuildsIdRolesId

Tuple Fields of GuildsIdRolesId

0: u64
GuildsIdTemplates

Tuple Fields of GuildsIdTemplates

0: u64
GuildsIdTemplatesCode

Tuple Fields of GuildsIdTemplatesCode

0: u64
GuildsIdVanityUrl

Tuple Fields of GuildsIdVanityUrl

0: u64
GuildsIdVoiceStates

Tuple Fields of GuildsIdVoiceStates

0: u64
GuildsIdWelcomeScreen

Tuple Fields of GuildsIdWelcomeScreen

0: u64
GuildsIdWebhooks

Tuple Fields of GuildsIdWebhooks

0: u64
InvitesCode
InteractionCallback

Operating on an interaction’s callback.

Tuple Fields of InteractionCallback

0: u64
StageInstances
UsersId
OauthApplicationsMe
UsersIdConnections
UsersIdChannels
UsersIdGuilds

Operating on the state of a guild that the user is in.

UsersIdGuildsId

Operating on the state of a guild that the user is in.

VoiceRegions

Operating on the voice regions available to the current user.

WebhooksIdTokenMessagesId

Operating on a message created by a webhook.

Tuple Fields of WebhooksIdTokenMessagesId

0: u64
WebhooksId

Operating on a webhook.

Tuple Fields of WebhooksId

0: u64

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

Parses a string into a path.

The string may start with a slash (/), which will be ignored.

Examples

use twilight_http::routing::Path;
use std::str::FromStr;

assert_eq!(Path::VoiceRegions, Path::from_str("/voice/regions")?);
assert_eq!(
    Path::ChannelsIdMessages(123),
    Path::from_str("channels/123/messages")?,
);

The associated error which can be returned from parsing.

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 !=.

The type returned in the event of a conversion error.

Performs the conversion.

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

Performs the conversion.

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.