#[non_exhaustive]pub struct VoiceState {Show 14 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 token: Option<String>,
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
token: Option<String>
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.
Trait Implementations
sourceimpl Clone for VoiceState
impl Clone for VoiceState
sourcefn clone(&self) -> VoiceState
fn clone(&self) -> VoiceState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VoiceState
impl Debug for VoiceState
sourceimpl<'de> Deserialize<'de> for VoiceState
impl<'de> Deserialize<'de> for VoiceState
sourcefn 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
sourceimpl Serialize for VoiceState
impl Serialize for VoiceState
Auto Trait Implementations
impl RefUnwindSafe for VoiceState
impl Send for VoiceState
impl Sync for VoiceState
impl Unpin for VoiceState
impl UnwindSafe for VoiceState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more