#[non_exhaustive]pub struct VoiceUpdate {
pub event: VoiceServerUpdate,
pub guild_id: Id<GuildMarker>,
pub op: Opcode,
pub session_id: String,
}
Expand description
A combined voice server and voice state update.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.event: VoiceServerUpdate
The inner event being forwarded to a node.
guild_id: Id<GuildMarker>
The guild ID of the player.
op: Opcode
The opcode of the event.
session_id: String
The session ID of the voice channel.
Implementations§
Source§impl VoiceUpdate
impl VoiceUpdate
Sourcepub fn new(
guild_id: Id<GuildMarker>,
session_id: impl Into<String>,
event: VoiceServerUpdate,
) -> Self
pub fn new( guild_id: Id<GuildMarker>, session_id: impl Into<String>, event: VoiceServerUpdate, ) -> Self
Create a new voice update event.
Trait Implementations§
Source§impl Clone for VoiceUpdate
impl Clone for VoiceUpdate
Source§fn clone(&self) -> VoiceUpdate
fn clone(&self) -> VoiceUpdate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VoiceUpdate
impl Debug for VoiceUpdate
Source§impl<'de> Deserialize<'de> for VoiceUpdate
impl<'de> Deserialize<'de> for VoiceUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Into<String>> From<(Id<GuildMarker>, T, VoiceServerUpdate)> for VoiceUpdate
impl<T: Into<String>> From<(Id<GuildMarker>, T, VoiceServerUpdate)> for VoiceUpdate
Source§fn from(
(guild_id, session_id, event): (Id<GuildMarker>, T, VoiceServerUpdate),
) -> Self
fn from( (guild_id, session_id, event): (Id<GuildMarker>, T, VoiceServerUpdate), ) -> Self
Converts to this type from the input type.
Source§impl From<VoiceUpdate> for OutgoingEvent
impl From<VoiceUpdate> for OutgoingEvent
Source§fn from(event: VoiceUpdate) -> OutgoingEvent
fn from(event: VoiceUpdate) -> OutgoingEvent
Converts to this type from the input type.
Source§impl PartialEq for VoiceUpdate
impl PartialEq for VoiceUpdate
Source§impl Serialize for VoiceUpdate
impl Serialize for VoiceUpdate
impl Eq for VoiceUpdate
impl StructuralPartialEq for VoiceUpdate
Auto Trait Implementations§
impl Freeze for VoiceUpdate
impl RefUnwindSafe for VoiceUpdate
impl Send for VoiceUpdate
impl Sync for VoiceUpdate
impl Unpin for VoiceUpdate
impl UnwindSafe for VoiceUpdate
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more