#[non_exhaustive]pub enum Path {
Show 89 variants
ApplicationCommand(u64),
ApplicationCommandId(u64),
ApplicationEmojis(u64),
ApplicationEmoji(u64),
ApplicationGuildCommand(u64),
ApplicationGuildCommandId(u64),
ApplicationsMe,
ChannelsId(u64),
ChannelsIdFollowers(u64),
ChannelsIdInvites(u64),
ChannelsIdMessages(u64),
ChannelsIdMessagesBulkDelete(u64),
ChannelsIdMessagesId(Method, u64),
ChannelsIdMessagesIdCrosspost(u64),
ChannelsIdMessagesIdReactions(u64),
ChannelsIdMessagesIdReactionsUserIdType(u64),
ChannelsIdMessagesIdThreads(u64),
ChannelsIdPermissionsOverwriteId(u64),
ChannelsIdPins(u64),
ChannelsIdPinsMessageId(u64),
ChannelsIdPolls(u64),
ChannelsIdRecipients(u64),
ChannelsIdThreadMembers(u64),
ChannelsIdThreadMembersId(u64),
ChannelsIdThreads(u64),
ChannelsIdTyping(u64),
ChannelsIdWebhooks(u64),
ApplicationIdEntitlements(u64),
ApplicationIdSKUs(u64),
Gateway,
GatewayBot,
Guilds,
GuildsId(u64),
GuildsIdAuditLogs(u64),
GuildsIdAutoModerationRules(u64),
GuildsIdAutoModerationRulesId(u64),
GuildsIdBans(u64),
GuildsIdBansId(u64),
GuildsIdBansUserId(u64),
GuildsIdChannels(u64),
GuildsIdEmojis(u64),
GuildsIdEmojisId(u64),
GuildsIdIntegrations(u64),
GuildsIdIntegrationsId(u64),
GuildsIdIntegrationsIdSync(u64),
GuildsIdInvites(u64),
GuildsIdMembers(u64),
GuildsIdMembersId(u64),
GuildsIdMembersIdRolesId(u64),
GuildsIdMembersMeNick(u64),
GuildsIdMembersSearch(u64),
GuildsIdMfa(u64),
GuildsIdOnboarding(u64),
GuildsIdPreview(u64),
GuildsIdPrune(u64),
GuildsIdRegions(u64),
GuildsIdRoles(u64),
GuildsIdRolesId(u64),
GuildsIdScheduledEvents(u64),
GuildsIdScheduledEventsId(u64),
GuildsIdScheduledEventsIdUsers(u64),
GuildsIdStickers(u64),
GuildsIdTemplates(u64),
GuildsIdTemplatesCode(u64, String),
GuildsIdThreads(u64),
GuildsIdVanityUrl(u64),
GuildsIdVoiceStates(u64),
GuildsIdWebhooks(u64),
GuildsIdWelcomeScreen(u64),
GuildsIdWidget(u64),
GuildsIdWidgetJson(u64),
GuildsTemplatesCode(String),
InteractionCallback(u64),
InvitesCode,
OauthApplicationsMe,
OauthMe,
StageInstances,
StickerPacks,
Stickers,
UsersId,
UsersIdChannels,
UsersIdConnections,
UsersIdGuilds,
UsersIdGuildsId,
UsersIdGuildsIdMember,
VoiceRegions,
WebhooksId(u64),
WebhooksIdToken(u64, String),
WebhooksIdTokenMessagesId(u64, String),
}
Expand description
An enum representing a path, most useful for ratelimiting implementations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ApplicationCommand(u64)
Operating on global commands.
ApplicationCommandId(u64)
Operating on a specific command.
ApplicationEmojis(u64)
Operating on application emojis.
ApplicationEmoji(u64)
Operating on a specific application emoji.
ApplicationGuildCommand(u64)
Operating on commands in a guild.
ApplicationGuildCommandId(u64)
Operating on a specific command in a guild.
ApplicationsMe
Operating on current user application,
ChannelsId(u64)
Operating on a channel.
ChannelsIdFollowers(u64)
Operating on a channel’s followers.
ChannelsIdInvites(u64)
Operating on a channel’s invites.
ChannelsIdMessages(u64)
Operating on a channel’s messages.
ChannelsIdMessagesBulkDelete(u64)
Operating on a channel’s messages by bulk deleting.
ChannelsIdMessagesId(Method, u64)
Operating on an individual channel’s message.
ChannelsIdMessagesIdCrosspost(u64)
Crossposting an individual channel’s message.
ChannelsIdMessagesIdReactions(u64)
Operating on an individual channel’s message’s reactions.
ChannelsIdMessagesIdReactionsUserIdType(u64)
Operating on an individual channel’s message’s reactions while specifying the user ID and emoji type.
ChannelsIdMessagesIdThreads(u64)
Operating on an individual channel’s message’s threads.
ChannelsIdPermissionsOverwriteId(u64)
Operating on a channel’s permission overwrites by ID.
ChannelsIdPins(u64)
Operating on a channel’s pins.
ChannelsIdPinsMessageId(u64)
Operating on a channel’s individual pinned message.
ChannelsIdPolls(u64)
Operating on a channel’s polls.
ChannelsIdRecipients(u64)
Operating on a group DM’s recipients.
ChannelsIdThreadMembers(u64)
Operating on a thread’s members.
ChannelsIdThreadMembersId(u64)
Operating on a thread’s member.
ChannelsIdThreads(u64)
Operating on a channel’s threads.
ChannelsIdTyping(u64)
Operating on a channel’s typing indicator.
ChannelsIdWebhooks(u64)
Operating on a channel’s webhooks.
ApplicationIdEntitlements(u64)
Operating on an application’s entitlements.
ApplicationIdSKUs(u64)
Operating on an application’s SKUs.
Gateway
Operating with the gateway information.
GatewayBot
Operating with the gateway information tailored to the current user.
Guilds
Operating on the guild resource.
GuildsId(u64)
Operating on one of user’s guilds.
GuildsIdAuditLogs(u64)
Operating on a ban from one of the user’s guilds.
GuildsIdAutoModerationRules(u64)
Operating on a guild’s auto moderation rules.
GuildsIdAutoModerationRulesId(u64)
Operating on an auto moderation rule from one of the user’s guilds.
GuildsIdBans(u64)
Operating on one of the user’s guilds’ bans.
GuildsIdBansId(u64)
Operating on a ban from one of the user’s guilds.
GuildsIdBansUserId(u64)
Operating on specific member’s ban from one of the user’s guilds.
GuildsIdChannels(u64)
Operating on one of the user’s guilds’ channels.
GuildsIdEmojis(u64)
Operating on one of the user’s guilds’ emojis.
GuildsIdEmojisId(u64)
Operating on an emoji from one of the user’s guilds.
GuildsIdIntegrations(u64)
Operating on one of the user’s guilds’ integrations.
GuildsIdIntegrationsId(u64)
Operating on an integration from one of the user’s guilds.
GuildsIdIntegrationsIdSync(u64)
Operating on an integration from one of the user’s guilds by synchronizing it.
GuildsIdInvites(u64)
Operating on one of the user’s guilds’ invites.
GuildsIdMembers(u64)
Operating on one of the user’s guilds’ members.
GuildsIdMembersId(u64)
Operating on a member from one of the user’s guilds.
GuildsIdMembersIdRolesId(u64)
Operating on a role of a member from one of the user’s guilds.
GuildsIdMembersMeNick(u64)
Operating on the user’s nickname in one of the user’s guilds.
GuildsIdMembersSearch(u64)
Operating on one of the user’s guilds’ members by searching.
GuildsIdMfa(u64)
Operating on one of the user’s guilds’ MFA level.
GuildsIdOnboarding(u64)
Operating on one of the user’s guilds’ onboarding.
GuildsIdPreview(u64)
Operating on one of the user’s guilds’ by previewing it.
GuildsIdPrune(u64)
Operating on one of the user’s guilds’ by pruning members.
GuildsIdRegions(u64)
Operating on the voice regions of one of the user’s guilds.
GuildsIdRoles(u64)
Operating on the roles of one of the user’s guilds.
GuildsIdRolesId(u64)
Operating on a role of one of the user’s guilds.
GuildsIdScheduledEvents(u64)
Operating on the guild’s scheduled events.
GuildsIdScheduledEventsId(u64)
Operating on a particular guild’s scheduled events.
GuildsIdScheduledEventsIdUsers(u64)
Operating on a particular guild’s scheduled event users.
GuildsIdStickers(u64)
Operating on one of the user’s guilds’ stickers.
GuildsIdTemplates(u64)
Operating on one of the user’s guilds’ templates.
GuildsIdTemplatesCode(u64, String)
Operating on a template from one of the user’s guilds.
GuildsIdThreads(u64)
Operating on one of the user’s guilds’ threads.
GuildsIdVanityUrl(u64)
Operating on one of the user’s guilds’ vanity URL.
GuildsIdVoiceStates(u64)
Operating on one of the user’s guilds’ voice states.
GuildsIdWebhooks(u64)
Operating on one of the user’s guilds’ webhooks.
GuildsIdWelcomeScreen(u64)
Operating on one of the user’s guilds’ welcome screen.
GuildsIdWidget(u64)
Operating on one of the user’s guild’s widget settings.
GuildsIdWidgetJson(u64)
Operating on one of the user’s guild’s widget.
GuildsTemplatesCode(String)
Operating on a guild template.
InteractionCallback(u64)
Operating on an interaction’s callback.
This path is not bound to the application’s global rate limit.
InvitesCode
Operating on an invite.
OauthApplicationsMe
Operating on the user’s application information.
OauthMe
Operating on the current authorization’s information.
StageInstances
Operating on stage instances.
StickerPacks
Operating on sticker packs.
Stickers
Operating on a sticker.
UsersId
Operating on a sticker.
UsersIdChannels
Operating on the user’s private channels.
UsersIdConnections
Operating on the user’s connections.
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.
UsersIdGuildsIdMember
Operating on the state of a guild that the user, as a member, is in.
VoiceRegions
Operating on the voice regions available to the current user.
WebhooksId(u64)
Operating on a webhook as a bot.
WebhooksIdToken(u64, String)
Operating on a webhook as a webhook.
When used with interactions, this path is not bound to the application’s global rate limit.
WebhooksIdTokenMessagesId(u64, String)
Operating on a message created by a webhook.
When used with interactions, this path is not bound to the application’s global rate limit.
Trait Implementations§
source§impl FromStr for Path
impl FromStr for Path
source§fn from_str(s: &str) -> Result<Path, <Path as FromStr>::Err>
fn from_str(s: &str) -> Result<Path, <Path as FromStr>::Err>
Parses a string into a path.
The string may start with a slash (/
), which will be ignored.
§Examples
use std::str::FromStr;
use twilight_http_ratelimiting::Path;
assert_eq!(Path::VoiceRegions, Path::from_str("/voice/regions")?);
assert_eq!(
Path::ChannelsIdMessages(123),
Path::from_str("channels/123/messages")?,
);
source§type Err = PathParseError
type Err = PathParseError
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.