pub struct UserStats {Show 19 fields
pub session: Option<u32>,
pub stats_only: Option<bool>,
pub certificates: Vec<Vec<u8>>,
pub from_client: Option<Stats>,
pub from_server: Option<Stats>,
pub udp_packets: Option<u32>,
pub tcp_packets: Option<u32>,
pub udp_ping_avg: Option<f32>,
pub udp_ping_var: Option<f32>,
pub tcp_ping_avg: Option<f32>,
pub tcp_ping_var: Option<f32>,
pub version: Option<Version>,
pub celt_versions: Vec<i32>,
pub address: Option<Vec<u8>>,
pub bandwidth: Option<u32>,
pub onlinesecs: Option<u32>,
pub idlesecs: Option<u32>,
pub strong_certificate: Option<bool>,
pub opus: Option<bool>,
}Expand description
Used to communicate user stats between the server and clients.
Fields§
§session: Option<u32>User whose stats these are.
stats_only: Option<bool>True if the message contains only mutable stats (packets, ping).
certificates: Vec<Vec<u8>>Full user certificate chain of the user certificate in DER format.
from_client: Option<Stats>Packet statistics for packets received from the client.
from_server: Option<Stats>Packet statistics for packets sent by the server.
udp_packets: Option<u32>Amount of UDP packets sent.
tcp_packets: Option<u32>Amount of TCP packets sent.
udp_ping_avg: Option<f32>UDP ping average.
udp_ping_var: Option<f32>UDP ping variance.
tcp_ping_avg: Option<f32>TCP ping average.
tcp_ping_var: Option<f32>TCP ping variance.
version: Option<Version>Client version.
celt_versions: Vec<i32>A list of CELT bitstream version constants supported by the client of this user.
address: Option<Vec<u8>>Client IP address.
bandwidth: Option<u32>Bandwidth used by this client.
onlinesecs: Option<u32>Connection duration.
idlesecs: Option<u32>Duration since last activity.
strong_certificate: Option<bool>True if the user has a strong certificate.
opus: Option<bool>Implementations§
Source§impl UserStats
impl UserStats
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 stats_only(&self) -> bool
pub fn stats_only(&self) -> bool
Returns the value of stats_only, or the default value if stats_only is unset.
Sourcepub fn udp_packets(&self) -> u32
pub fn udp_packets(&self) -> u32
Returns the value of udp_packets, or the default value if udp_packets is unset.
Sourcepub fn tcp_packets(&self) -> u32
pub fn tcp_packets(&self) -> u32
Returns the value of tcp_packets, or the default value if tcp_packets is unset.
Sourcepub fn udp_ping_avg(&self) -> f32
pub fn udp_ping_avg(&self) -> f32
Returns the value of udp_ping_avg, or the default value if udp_ping_avg is unset.
Sourcepub fn udp_ping_var(&self) -> f32
pub fn udp_ping_var(&self) -> f32
Returns the value of udp_ping_var, or the default value if udp_ping_var is unset.
Sourcepub fn tcp_ping_avg(&self) -> f32
pub fn tcp_ping_avg(&self) -> f32
Returns the value of tcp_ping_avg, or the default value if tcp_ping_avg is unset.
Sourcepub fn tcp_ping_var(&self) -> f32
pub fn tcp_ping_var(&self) -> f32
Returns the value of tcp_ping_var, or the default value if tcp_ping_var is unset.
Sourcepub fn address(&self) -> &[u8] ⓘ
pub fn address(&self) -> &[u8] ⓘ
Returns the value of address, or the default value if address is unset.
Sourcepub fn bandwidth(&self) -> u32
pub fn bandwidth(&self) -> u32
Returns the value of bandwidth, or the default value if bandwidth is unset.
Sourcepub fn onlinesecs(&self) -> u32
pub fn onlinesecs(&self) -> u32
Returns the value of onlinesecs, or the default value if onlinesecs is unset.
Sourcepub fn idlesecs(&self) -> u32
pub fn idlesecs(&self) -> u32
Returns the value of idlesecs, or the default value if idlesecs is unset.
Sourcepub fn strong_certificate(&self) -> bool
pub fn strong_certificate(&self) -> bool
Returns the value of strong_certificate, or the default value if strong_certificate is unset.
Trait Implementations§
Source§impl Message for UserStats
impl Message for UserStats
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.