pub struct UserState {Show 23 fields
pub session: Option<u32>,
pub actor: Option<u32>,
pub name: Option<String>,
pub user_id: Option<u32>,
pub channel_id: Option<u32>,
pub mute: Option<bool>,
pub deaf: Option<bool>,
pub suppress: Option<bool>,
pub self_mute: Option<bool>,
pub self_deaf: Option<bool>,
pub texture: Option<Vec<u8>>,
pub plugin_context: Option<Vec<u8>>,
pub plugin_identity: Option<String>,
pub comment: Option<String>,
pub hash: Option<String>,
pub comment_hash: Option<Vec<u8>>,
pub texture_hash: Option<Vec<u8>>,
pub priority_speaker: Option<bool>,
pub recording: Option<bool>,
pub temporary_access_tokens: Vec<String>,
pub listening_channel_add: Vec<u32>,
pub listening_channel_remove: Vec<u32>,
pub listening_volume_adjustment: Vec<VolumeAdjustment>,
}Expand description
Sent by the server when it communicates new and changed users to client. First seen during login procedure. May be sent by the client when it wishes to alter its state.
Fields§
§session: Option<u32>Unique user session ID of the user whose state this is, may change on reconnect.
actor: Option<u32>The session of the user who is updating this user.
name: Option<String>User name, UTF-8 encoded.
user_id: Option<u32>Registered user ID if the user is registered.
channel_id: Option<u32>Channel on which the user is.
mute: Option<bool>True if the user is muted by admin.
deaf: Option<bool>True if the user is deafened by admin.
suppress: Option<bool>True if the user has been suppressed from talking by a reason other than being muted.
self_mute: Option<bool>True if the user has muted self.
self_deaf: Option<bool>True if the user has deafened self.
texture: Option<Vec<u8>>User image if it is less than 128 bytes.
plugin_context: Option<Vec<u8>>The positional audio plugin identifier. Positional audio information is only sent to users who share identical plugin contexts.
This value is not transmitted to clients.
plugin_identity: Option<String>The user’s plugin-specific identity. This value is not transmitted to clients.
comment: Option<String>User comment if it is less than 128 bytes.
hash: Option<String>The hash of the user certificate.
comment_hash: Option<Vec<u8>>SHA1 hash of the user comment if it 128 bytes or more.
texture_hash: Option<Vec<u8>>SHA1 hash of the user picture if it 128 bytes or more.
priority_speaker: Option<bool>True if the user is a priority speaker.
recording: Option<bool>True if the user is currently recording.
temporary_access_tokens: Vec<String>A list of temporary access tokens to be respected when processing this request.
listening_channel_add: Vec<u32>A list of channels the user wants to start listening to.
listening_channel_remove: Vec<u32>a list of channels the user does no longer want to listen to.
listening_volume_adjustment: Vec<VolumeAdjustment>A list of volume adjustments the user has applied to listeners
Implementations§
Source§impl UserState
impl UserState
Sourcepub fn session(&self) -> u32
pub fn session(&self) -> u32
Returns the value of session, or the default value if session is unset.
Sourcepub fn user_id(&self) -> u32
pub fn user_id(&self) -> u32
Returns the value of user_id, or the default value if user_id is unset.
Sourcepub fn channel_id(&self) -> u32
pub fn channel_id(&self) -> u32
Returns the value of channel_id, or the default value if channel_id is unset.
Sourcepub fn suppress(&self) -> bool
pub fn suppress(&self) -> bool
Returns the value of suppress, or the default value if suppress is unset.
Sourcepub fn self_mute(&self) -> bool
pub fn self_mute(&self) -> bool
Returns the value of self_mute, or the default value if self_mute is unset.
Sourcepub fn self_deaf(&self) -> bool
pub fn self_deaf(&self) -> bool
Returns the value of self_deaf, or the default value if self_deaf is unset.
Sourcepub fn texture(&self) -> &[u8] ⓘ
pub fn texture(&self) -> &[u8] ⓘ
Returns the value of texture, or the default value if texture is unset.
Sourcepub fn plugin_context(&self) -> &[u8] ⓘ
pub fn plugin_context(&self) -> &[u8] ⓘ
Returns the value of plugin_context, or the default value if plugin_context is unset.
Sourcepub fn plugin_identity(&self) -> &str
pub fn plugin_identity(&self) -> &str
Returns the value of plugin_identity, or the default value if plugin_identity is unset.
Sourcepub fn comment(&self) -> &str
pub fn comment(&self) -> &str
Returns the value of comment, or the default value if comment is unset.
Sourcepub fn comment_hash(&self) -> &[u8] ⓘ
pub fn comment_hash(&self) -> &[u8] ⓘ
Returns the value of comment_hash, or the default value if comment_hash is unset.
Sourcepub fn texture_hash(&self) -> &[u8] ⓘ
pub fn texture_hash(&self) -> &[u8] ⓘ
Returns the value of texture_hash, or the default value if texture_hash is unset.
Sourcepub fn priority_speaker(&self) -> bool
pub fn priority_speaker(&self) -> bool
Returns the value of priority_speaker, or the default value if priority_speaker is unset.
Trait Implementations§
Source§impl Message for UserState
impl Message for UserState
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.