[][src]Enum serenity::constants::OpCode

pub enum OpCode {
    Event,
    Heartbeat,
    Identify,
    StatusUpdate,
    VoiceStateUpdate,
    VoiceServerPing,
    Resume,
    Reconnect,
    GetGuildMembers,
    InvalidSession,
    Hello,
    HeartbeatAck,
    // some variants omitted
}

Enum to map gateway opcodes.

Variants

Event

Dispatches an event.

Heartbeat

Used for ping checking.

Identify

Used for client handshake.

StatusUpdate

Used to update the client status.

VoiceStateUpdate

Used to join/move/leave voice channels.

VoiceServerPing

Used for voice ping checking.

Resume

Used to resume a closed connection.

Reconnect

Used to tell clients to reconnect to the gateway.

GetGuildMembers

Used to request guild members.

InvalidSession

Used to notify clients that they have an invalid session Id.

Hello

Sent immediately after connection, contains heartbeat + server info.

HeartbeatAck

Sent immediately following a client heartbeat that was received.

Implementations

impl OpCode[src]

pub fn num(self) -> u64[src]

Trait Implementations

impl Clone for OpCode[src]

impl Copy for OpCode[src]

impl Debug for OpCode[src]

impl<'de> Deserialize<'de> for OpCode[src]

impl Eq for OpCode[src]

impl Hash for OpCode[src]

impl Ord for OpCode[src]

impl PartialEq<OpCode> for OpCode[src]

impl PartialOrd<OpCode> for OpCode[src]

impl Serialize for OpCode[src]

impl StructuralEq for OpCode[src]

impl StructuralPartialEq for OpCode[src]

Auto Trait Implementations

impl RefUnwindSafe for OpCode

impl Send for OpCode

impl Sync for OpCode

impl Unpin for OpCode

impl UnwindSafe for OpCode

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> CloneAny for T where
    T: Clone + Any
[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> 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<T> UnsafeAny for T where
    T: Any

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