[][src]Enum smalld::Intent

pub enum Intent {
    Guilds,
    GuildMembers,
    GuildBans,
    GuildEmojis,
    GuildIntegrations,
    GuildWebhooks,
    GuildInvites,
    GuildVoiceStates,
    GuildPresences,
    GuildMessages,
    GuildMessageReactions,
    GuildMessageTyping,
    DirectMessages,
    DirectMessageReactions,
    DirectMessageTyping,
}

Gateway intent to be requested upon identifying with Discord. Configure via intents.

Intents can be converted to bit masks and combined using |.

use smalld::Intent;
assert_eq!(Intent::GuildMembers as u16, 0b0010);
assert_eq!((Intent::GuildMembers | Intent::GuildBans) as u16, 0b0110);
assert_eq!((Intent::GuildMembers | Intent::GuildBans | Intent::GuildEmojis) as u16, 0b1110);

Variants

Guilds
GuildMembers
GuildBans
GuildEmojis
GuildIntegrations
GuildWebhooks
GuildInvites
GuildVoiceStates
GuildPresences
GuildMessages
GuildMessageReactions
GuildMessageTyping
DirectMessages
DirectMessageReactions
DirectMessageTyping

Implementations

impl Intent[src]

pub const ALL: u16[src]

pub const PRIVILEGED: u16[src]

pub const UNPRIVILEGED: u16[src]

pub fn bit_mask_of<I>(intents: I) -> u16 where
    I: IntoIterator<Item = Intent>, 
[src]

Trait Implementations

impl BitOr<Intent> for Intent[src]

type Output = u16

The resulting type after applying the | operator.

impl Clone for Intent[src]

impl Copy for Intent[src]

impl Debug for Intent[src]

Auto Trait Implementations

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<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,