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

pub enum Path {
    ChannelsId(u64),
    ChannelsIdInvites(u64),
    ChannelsIdMessages(u64),
    ChannelsIdMessagesBulkDelete(u64),
    ChannelsIdMessagesId(Methodu64),
    ChannelsIdMessagesIdReactions(u64),
    ChannelsIdMessagesIdReactionsUserIdType(u64),
    ChannelsIdPermissionsOverwriteId(u64),
    ChannelsIdPins(u64),
    ChannelsIdPinsMessageId(u64),
    ChannelsIdTyping(u64),
    ChannelsIdWebhooks(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),
    GuildsIdPreview(u64),
    GuildsIdPrune(u64),
    GuildsIdRegions(u64),
    GuildsIdRoles(u64),
    GuildsIdRolesId(u64),
    GuildsIdVanityUrl(u64),
    GuildsIdWebhooks(u64),
    InvitesCode,
    UsersId,
    UsersIdConnections,
    UsersIdChannels,
    UsersIdGuilds,
    UsersIdGuildsId,
    VoiceRegions,
    WebhooksId(u64),
}

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

Variants

ChannelsId(u64)

Operating on a channel.

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(Methodu64)

Operating on 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.

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.

ChannelsIdTyping(u64)

Operating on a channel's typing indicator.

ChannelsIdWebhooks(u64)

Operating on a channel's webhooks.

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.

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)
GuildsIdPreview(u64)
GuildsIdPrune(u64)
GuildsIdRegions(u64)
GuildsIdRoles(u64)
GuildsIdRolesId(u64)
GuildsIdVanityUrl(u64)
GuildsIdWebhooks(u64)
InvitesCode
UsersId
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.

WebhooksId(u64)

Operating on a webhook.

Trait Implementations

impl Clone for Path[src]

impl Debug for Path[src]

impl Eq for Path[src]

impl FromStr for Path[src]

type Err = PathParseError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

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")?,
);

impl Hash for Path[src]

impl PartialEq<Path> for Path[src]

impl StructuralEq for Path[src]

impl StructuralPartialEq for Path[src]

impl<'_> TryFrom<(Method, &'_ str)> for Path[src]

type Error = PathParseError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Path

impl Send for Path

impl Sync for Path

impl Unpin for Path

impl UnwindSafe for Path

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.