#[non_exhaustive]pub struct UpdateVoiceState {
pub guild_id: GuildId,
pub channel_id: Option<ChannelId>,
pub self_mute: bool,
pub self_deaf: bool,
}Expand description
Update Voice State (opcode 4): joins, moves between or leaves voice channels.
discord.js counterpart: what @discordjs/voice sends through the guild’s shard.
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.guild_id: GuildIdThe guild.
channel_id: Option<ChannelId>The voice channel to join (None to disconnect).
self_mute: boolWhether the bot is muted.
self_deaf: boolWhether the bot is deafened.
Implementations§
Trait Implementations§
Source§impl Clone for UpdateVoiceState
impl Clone for UpdateVoiceState
impl Copy for UpdateVoiceState
Source§impl Debug for UpdateVoiceState
impl Debug for UpdateVoiceState
impl Eq for UpdateVoiceState
Source§impl GatewayCommand for UpdateVoiceState
impl GatewayCommand for UpdateVoiceState
Source§impl Hash for UpdateVoiceState
impl Hash for UpdateVoiceState
Source§impl PartialEq for UpdateVoiceState
impl PartialEq for UpdateVoiceState
Source§impl Serialize for UpdateVoiceState
impl Serialize for UpdateVoiceState
impl StructuralPartialEq for UpdateVoiceState
Auto Trait Implementations§
impl Freeze for UpdateVoiceState
impl RefUnwindSafe for UpdateVoiceState
impl Send for UpdateVoiceState
impl Sync for UpdateVoiceState
impl Unpin for UpdateVoiceState
impl UnsafeUnpin for UpdateVoiceState
impl UnwindSafe for UpdateVoiceState
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