#[non_exhaustive]pub enum CallEvent {
Resumed,
Reconnected,
Disconnected(DisconnectReason),
UserJoined(UserId),
UserLeft(UserId),
#[non_exhaustive] Speaking {
user_id: UserId,
ssrc: u32,
},
SpeakingStarted(UserId),
SpeakingStopped(UserId),
}Expand description
An event of a Call, from Call::events (D-321, D-337).
discord.js counterpart: the state changes of VoiceConnection and the events of its
receiver’s SpeakingMap.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Resumed
The connection was lost and resumed: nothing was missed.
Reconnected
The connection was made again: after a lost session, or to the voice server of a channel a moderator moved the bot to. Audio goes on.
Disconnected(DisconnectReason)
The call ended, for this reason; the stream ends after it.
UserJoined(UserId)
A user joined the voice channel (or was in it when the bot joined).
UserLeft(UserId)
A user left the voice channel.
#[non_exhaustive]Speaking
A user started speaking with this SSRC: the RTP source of their audio.
Fields
This variant is marked as non-exhaustive
SpeakingStarted(UserId)
A user’s audio started coming (D-369): their first packet after none for 100 ms.
Discord sends none to a deafened bot (see Call::subscribe).
discord.js counterpart: the start event of VoiceReceiver#speaking.
SpeakingStopped(UserId)
100 ms have passed since a user’s last packet (D-369).
discord.js counterpart: the end event of VoiceReceiver#speaking.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CallEvent
impl !UnwindSafe for CallEvent
impl Freeze for CallEvent
impl Send for CallEvent
impl Sync for CallEvent
impl Unpin for CallEvent
impl UnsafeUnpin for CallEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more