#[non_exhaustive]pub struct VoiceState {Show 13 fields
pub channel_id: Option<ChannelId>,
pub deaf: bool,
pub guild_id: Option<GuildId>,
pub member: Option<Member>,
pub mute: bool,
pub self_deaf: bool,
pub self_mute: bool,
pub self_stream: Option<bool>,
pub self_video: bool,
pub session_id: String,
pub suppress: bool,
pub user_id: UserId,
pub request_to_speak_timestamp: Option<Timestamp>,
}
Expand description
A user’s state within a voice channel.
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.channel_id: Option<ChannelId>
§deaf: bool
§guild_id: Option<GuildId>
§member: Option<Member>
§mute: bool
§self_deaf: bool
§self_mute: bool
§self_stream: Option<bool>
§self_video: bool
§session_id: String
§suppress: bool
§user_id: UserId
§request_to_speak_timestamp: Option<Timestamp>
When unsuppressed, non-bot users will have this set to the current time. Bot users will be
set to None
. When suppressed, the user will have their
Self::request_to_speak_timestamp
removed.
Implementations§
Source§impl<'de> VoiceState
impl<'de> VoiceState
pub fn deserialize<__D>(__deserializer: __D) -> Result<VoiceState, __D::Error>where
__D: Deserializer<'de>,
Source§impl VoiceState
impl VoiceState
pub fn serialize<__S>(
__self: &VoiceState,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Trait Implementations§
Source§impl Clone for VoiceState
impl Clone for VoiceState
Source§fn clone(&self) -> VoiceState
fn clone(&self) -> VoiceState
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 VoiceState
impl Debug for VoiceState
Source§impl<'de> Deserialize<'de> for VoiceState
impl<'de> Deserialize<'de> for VoiceState
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VoiceState
impl RefUnwindSafe for VoiceState
impl Send for VoiceState
impl Sync for VoiceState
impl Unpin for VoiceState
impl UnwindSafe for VoiceState
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