Enum songbird::CoreEvent[][src]

#[non_exhaustive]pub enum CoreEvent {
    SpeakingStateUpdate,
    SpeakingUpdate,
    VoicePacket,
    RtcpPacket,
    ClientConnect,
    ClientDisconnect,
    DriverConnect,
    DriverReconnect,
    DriverConnectFailed,
    DriverReconnectFailed,
    SsrcKnown,
}

Voice core events occur on receipt of voice packets and telemetry.

Core events persist while the action in EventData returns None.

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.
SpeakingStateUpdate

Fired on receipt of a speaking state update from another host.

Note: this will fire when a user starts speaking for the first time, or changes their capabilities.

SpeakingUpdate

Fires when a source starts speaking, or stops speaking (i.e., 5 consecutive silent frames).

VoicePacket

Fires on receipt of a voice packet from another stream in the voice call.

As RTP packets do not map to Discord’s notion of users, SSRCs must be mapped back using the user IDs seen through client connection, disconnection, or speaking state update.

RtcpPacket

Fires on receipt of an RTCP packet, containing various call stats such as latency reports.

ClientConnect

Fires whenever a user connects to the same stream as the bot.

ClientDisconnect

Fires whenever a user disconnects from the same stream as the bot.

DriverConnect

Fires when this driver successfully connects to a voice channel.

DriverReconnect

Fires when this driver successfully reconnects after a network error.

DriverConnectFailed

Fires when this driver fails to connect to a voice channel.

DriverReconnectFailed

Fires when this driver fails to reconnect to a voice channel after a network error.

Users will need to manually reconnect on receipt of this error.

SsrcKnown

Fires whenever the driver is assigned a new RTP SSRC by the voice server.

This typically fires alongside a DriverConnect, or a full DriverReconnect.

Trait Implementations

impl Clone for CoreEvent[src]

impl Copy for CoreEvent[src]

impl Debug for CoreEvent[src]

impl Eq for CoreEvent[src]

impl From<CoreEvent> for UntimedEvent[src]

impl From<CoreEvent> for Event[src]

impl Hash for CoreEvent[src]

impl PartialEq<CoreEvent> for CoreEvent[src]

impl StructuralEq for CoreEvent[src]

impl StructuralPartialEq for CoreEvent[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>, 

impl<T> WithSubscriber for T[src]