[][src]Struct twilight_gateway::EventTypeFlags

#[non_exhaustive]pub struct EventTypeFlags { /* fields omitted */ }

Bitflags representing all of the possible types of events.

Implementations

impl EventTypeFlags[src]

pub const BAN_ADD: EventTypeFlags[src]

User has been banned from a guild.

pub const BAN_REMOVE: EventTypeFlags[src]

User has been unbanned from a guild.

pub const CHANNEL_CREATE: EventTypeFlags[src]

Channel has been created.

pub const CHANNEL_DELETE: EventTypeFlags[src]

Channel has been deleted.

pub const CHANNEL_PINS_UPDATE: EventTypeFlags[src]

Channel's pins have been updated.

pub const CHANNEL_UPDATE: EventTypeFlags[src]

Channel has been updated.

pub const GATEWAY_HEARTBEAT: EventTypeFlags[src]

Heartbeat has been created.

pub const GATEWAY_HEARTBEAT_ACK: EventTypeFlags[src]

Heartbeat has been acknowledged.

pub const GATEWAY_HELLO: EventTypeFlags[src]

A "hello" packet has been received from the gateway.

pub const GATEWAY_INVALIDATE_SESSION: EventTypeFlags[src]

Shard's session has been invalidated.

A payload containing a boolean is included. If true the session is resumable. If not, then the shard must initialize a new session.

pub const GATEWAY_RECONNECT: EventTypeFlags[src]

Gateway is indicating that a shard should perform a reconnect.

pub const GIFT_CODE_UPDATE: EventTypeFlags[src]

Gift code sent in a channel has been updated.

pub const GUILD_CREATE: EventTypeFlags[src]

A guild has been created.

pub const GUILD_DELETE: EventTypeFlags[src]

A guild has been deleted or the current user has been removed from a guild.

pub const GUILD_EMOJIS_UPDATE: EventTypeFlags[src]

A guild's emojis have been updated.

pub const GUILD_INTEGRATIONS_UPDATE: EventTypeFlags[src]

A guild's integrations have been updated.

pub const GUILD_UPDATE: EventTypeFlags[src]

A guild has been updated.

pub const INVITE_CREATE: EventTypeFlags[src]

Invite for a channel has been created.

pub const INVITE_DELETE: EventTypeFlags[src]

Invite for a channel has been deleted.

pub const MEMBER_ADD: EventTypeFlags[src]

Member has been added to a guild.

pub const MEMBER_REMOVE: EventTypeFlags[src]

Member has been removed from a guild.

pub const MEMBER_UPDATE: EventTypeFlags[src]

Member in a guild has been updated.

pub const MEMBER_CHUNK: EventTypeFlags[src]

Group of members from a guild.

This may be all of the remaining members or not; the chunk index in the event payload needs to be confirmed.

pub const MESSAGE_CREATE: EventTypeFlags[src]

Message created in a channel.

pub const MESSAGE_DELETE: EventTypeFlags[src]

Message deleted in a channel.

pub const MESSAGE_DELETE_BULK: EventTypeFlags[src]

Multiple messages have been deleted in a channel.

pub const MESSAGE_UPDATE: EventTypeFlags[src]

Message in a channel has been updated.

pub const PRESENCE_UPDATE: EventTypeFlags[src]

User's presence details are updated.

pub const PRESENCES_REPLACE: EventTypeFlags[src]

Group of presences are replaced.

This is a placeholder as it can happen for bots but has no real meaning.

pub const REACTION_ADD: EventTypeFlags[src]

Reaction has been added to a message.

pub const REACTION_REMOVE: EventTypeFlags[src]

Reaction has been removed from a message.

pub const REACTION_REMOVE_ALL: EventTypeFlags[src]

All of the reactions for a message have been removed.

pub const REACTION_REMOVE_EMOJI: EventTypeFlags[src]

All of a given emoji's reactions for a message have been removed.

pub const READY: EventTypeFlags[src]

Session is initialized.

pub const RESUMED: EventTypeFlags[src]

Session is resumed.

pub const ROLE_CREATE: EventTypeFlags[src]

Role has been created in a guild.

pub const ROLE_DELETE: EventTypeFlags[src]

Role has been deleted in a guild.

pub const ROLE_UPDATE: EventTypeFlags[src]

Role has been updated in a guild.

pub const SHARD_CONNECTED: EventTypeFlags[src]

Shard has finalized a session with the gateway.

pub const SHARD_CONNECTING: EventTypeFlags[src]

Shard has begun connecting to the gateway.

pub const SHARD_DISCONNECTED: EventTypeFlags[src]

Shard has disconnected from the gateway.

pub const SHARD_IDENTIFYING: EventTypeFlags[src]

Shard is identifying to create a session with the gateway.

pub const SHARD_PAYLOAD: EventTypeFlags[src]

Incoming message has been received from the gateway.

pub const SHARD_RECONNECTING: EventTypeFlags[src]

Shard is reconnecting to the gateway.

pub const SHARD_RESUMING: EventTypeFlags[src]

Shard is resuming a session with the gateway.

pub const TYPING_START: EventTypeFlags[src]

User has begun typing in a channel.

pub const UNAVAILABLE_GUILD: EventTypeFlags[src]

Guild is unavailable, potentially due to an outage.

pub const USER_UPDATE: EventTypeFlags[src]

Current user's profile has been updated.

pub const VOICE_SERVER_UPDATE: EventTypeFlags[src]

Voice server has provided an update with voice session details.

pub const VOICE_STATE_UPDATE: EventTypeFlags[src]

User's state in a voice channel has been updated.

pub const WEBHOOKS_UPDATE: EventTypeFlags[src]

Webhook in a guild has been updated.

pub const fn empty() -> EventTypeFlags[src]

Returns an empty set of flags

pub const fn all() -> EventTypeFlags[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u64[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u64) -> Option<EventTypeFlags>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u64) -> EventTypeFlags[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u64) -> EventTypeFlags[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: EventTypeFlags) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: EventTypeFlags) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: EventTypeFlags)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: EventTypeFlags)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: EventTypeFlags)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: EventTypeFlags, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Binary for EventTypeFlags[src]

impl BitAnd<EventTypeFlags> for EventTypeFlags[src]

type Output = EventTypeFlags

The resulting type after applying the & operator.

pub fn bitand(self, other: EventTypeFlags) -> EventTypeFlags[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<EventTypeFlags> for EventTypeFlags[src]

pub fn bitand_assign(&mut self, other: EventTypeFlags)[src]

Disables all flags disabled in the set.

impl BitOr<EventTypeFlags> for EventTypeFlags[src]

type Output = EventTypeFlags

The resulting type after applying the | operator.

pub fn bitor(self, other: EventTypeFlags) -> EventTypeFlags[src]

Returns the union of the two sets of flags.

impl BitOrAssign<EventTypeFlags> for EventTypeFlags[src]

pub fn bitor_assign(&mut self, other: EventTypeFlags)[src]

Adds the set of flags.

impl BitXor<EventTypeFlags> for EventTypeFlags[src]

type Output = EventTypeFlags

The resulting type after applying the ^ operator.

pub fn bitxor(self, other: EventTypeFlags) -> EventTypeFlags[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<EventTypeFlags> for EventTypeFlags[src]

pub fn bitxor_assign(&mut self, other: EventTypeFlags)[src]

Toggles the set of flags.

impl Clone for EventTypeFlags[src]

impl Copy for EventTypeFlags[src]

impl Debug for EventTypeFlags[src]

impl Default for EventTypeFlags[src]

impl Eq for EventTypeFlags[src]

impl Extend<EventTypeFlags> for EventTypeFlags[src]

impl From<EventType> for EventTypeFlags[src]

impl FromIterator<EventTypeFlags> for EventTypeFlags[src]

impl Hash for EventTypeFlags[src]

impl LowerHex for EventTypeFlags[src]

impl Not for EventTypeFlags[src]

type Output = EventTypeFlags

The resulting type after applying the ! operator.

pub fn not(self) -> EventTypeFlags[src]

Returns the complement of this set of flags.

impl Octal for EventTypeFlags[src]

impl Ord for EventTypeFlags[src]

impl PartialEq<EventTypeFlags> for EventTypeFlags[src]

impl PartialOrd<EventTypeFlags> for EventTypeFlags[src]

impl StructuralEq for EventTypeFlags[src]

impl StructuralPartialEq for EventTypeFlags[src]

impl Sub<EventTypeFlags> for EventTypeFlags[src]

type Output = EventTypeFlags

The resulting type after applying the - operator.

pub fn sub(self, other: EventTypeFlags) -> EventTypeFlags[src]

Returns the set difference of the two sets of flags.

impl SubAssign<EventTypeFlags> for EventTypeFlags[src]

pub fn sub_assign(&mut self, other: EventTypeFlags)[src]

Disables all flags enabled in the set.

impl<'a> TryFrom<(u8, Option<&'a str>)> for EventTypeFlags[src]

type Error = (u8, Option<&'a str>)

The type returned in the event of a conversion error.

impl UpperHex for EventTypeFlags[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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument 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>,