[][src]Enum serenity_voice_model::Event

#[non_exhaustive]pub enum Event {
    Identify(Identify),
    SelectProtocol(SelectProtocol),
    Ready(Ready),
    Heartbeat(Heartbeat),
    SessionDescription(SessionDescription),
    Speaking(Speaking),
    HeartbeatAck(HeartbeatAck),
    Resume(Resume),
    Hello(Hello),
    Resumed,
    ClientConnect(ClientConnect),
    ClientDisconnect(ClientDisconnect),
}

A representation of data received for voice gateway events.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Identify(Identify)

Used to begin a voice websocket connection.

SelectProtocol(SelectProtocol)

Used to select the voice protocol and encryption mechanism.

Ready(Ready)

Server's response to the client's Identify operation. Contains session-specific information, e.g. SSRC, and supported encryption modes.

Heartbeat(Heartbeat)

Periodic messages used to keep the websocket connection alive.

SessionDescription(SessionDescription)

Server's confirmation of a negotiated encryption scheme.

Speaking(Speaking)

A voice event denoting that someone is speaking.

HeartbeatAck(HeartbeatAck)

Acknowledgement from the server for a prior voice heartbeat.

Resume(Resume)

Sent by the client after a disconnect to attempt to resume a session.

Hello(Hello)

Used to determine how often the client must send a heartbeat.

Resumed

Message received if a Resume request was successful.

ClientConnect(ClientConnect)

Status update in the current channel, indicating that a user has connected.

ClientDisconnect(ClientDisconnect)

Status update in the current channel, indicating that a user has disconnected.

Implementations

impl Event[src]

pub fn kind(&self) -> OpCode[src]

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

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

impl From<ClientConnect> for Event[src]

impl From<ClientDisconnect> for Event[src]

impl From<Heartbeat> for Event[src]

impl From<HeartbeatAck> for Event[src]

impl From<Hello> for Event[src]

impl From<Identify> for Event[src]

impl From<Ready> for Event[src]

impl From<Resume> for Event[src]

impl From<SelectProtocol> for Event[src]

impl From<SessionDescription> for Event[src]

impl From<Speaking> for Event[src]

impl Serialize for Event[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.