CMsgServerNetworkStats

Struct CMsgServerNetworkStats 

Source
pub struct CMsgServerNetworkStats {
Show 25 fields pub dedicated: Option<bool>, pub cpu_usage: Option<i32>, pub memory_used_mb: Option<i32>, pub memory_free_mb: Option<i32>, pub uptime: Option<i32>, pub spawn_count: Option<i32>, pub num_clients: Option<i32>, pub num_bots: Option<i32>, pub num_spectators: Option<i32>, pub num_tv_relays: Option<i32>, pub fps: Option<f32>, pub ports: Vec<Port>, pub avg_ping_ms: Option<f32>, pub avg_engine_latency_out: Option<f32>, pub avg_packets_out: Option<f32>, pub avg_packets_in: Option<f32>, pub avg_loss_out: Option<f32>, pub avg_loss_in: Option<f32>, pub avg_data_out: Option<f32>, pub avg_data_in: Option<f32>, pub total_data_in: Option<u64>, pub total_packets_in: Option<u64>, pub total_data_out: Option<u64>, pub total_packets_out: Option<u64>, pub players: Vec<Player>,
}

Fields§

§dedicated: Option<bool>§cpu_usage: Option<i32>§memory_used_mb: Option<i32>§memory_free_mb: Option<i32>§uptime: Option<i32>§spawn_count: Option<i32>§num_clients: Option<i32>§num_bots: Option<i32>§num_spectators: Option<i32>§num_tv_relays: Option<i32>§fps: Option<f32>§ports: Vec<Port>§avg_ping_ms: Option<f32>§avg_engine_latency_out: Option<f32>§avg_packets_out: Option<f32>§avg_packets_in: Option<f32>§avg_loss_out: Option<f32>§avg_loss_in: Option<f32>§avg_data_out: Option<f32>§avg_data_in: Option<f32>§total_data_in: Option<u64>§total_packets_in: Option<u64>§total_data_out: Option<u64>§total_packets_out: Option<u64>§players: Vec<Player>

Implementations§

Source§

impl CMsgServerNetworkStats

Source

pub fn dedicated(&self) -> bool

Returns the value of dedicated, or the default value if dedicated is unset.

Source

pub fn cpu_usage(&self) -> i32

Returns the value of cpu_usage, or the default value if cpu_usage is unset.

Source

pub fn memory_used_mb(&self) -> i32

Returns the value of memory_used_mb, or the default value if memory_used_mb is unset.

Source

pub fn memory_free_mb(&self) -> i32

Returns the value of memory_free_mb, or the default value if memory_free_mb is unset.

Source

pub fn uptime(&self) -> i32

Returns the value of uptime, or the default value if uptime is unset.

Source

pub fn spawn_count(&self) -> i32

Returns the value of spawn_count, or the default value if spawn_count is unset.

Source

pub fn num_clients(&self) -> i32

Returns the value of num_clients, or the default value if num_clients is unset.

Source

pub fn num_bots(&self) -> i32

Returns the value of num_bots, or the default value if num_bots is unset.

Source

pub fn num_spectators(&self) -> i32

Returns the value of num_spectators, or the default value if num_spectators is unset.

Source

pub fn num_tv_relays(&self) -> i32

Returns the value of num_tv_relays, or the default value if num_tv_relays is unset.

Source

pub fn fps(&self) -> f32

Returns the value of fps, or the default value if fps is unset.

Source

pub fn avg_ping_ms(&self) -> f32

Returns the value of avg_ping_ms, or the default value if avg_ping_ms is unset.

Source

pub fn avg_engine_latency_out(&self) -> f32

Returns the value of avg_engine_latency_out, or the default value if avg_engine_latency_out is unset.

Source

pub fn avg_packets_out(&self) -> f32

Returns the value of avg_packets_out, or the default value if avg_packets_out is unset.

Source

pub fn avg_packets_in(&self) -> f32

Returns the value of avg_packets_in, or the default value if avg_packets_in is unset.

Source

pub fn avg_loss_out(&self) -> f32

Returns the value of avg_loss_out, or the default value if avg_loss_out is unset.

Source

pub fn avg_loss_in(&self) -> f32

Returns the value of avg_loss_in, or the default value if avg_loss_in is unset.

Source

pub fn avg_data_out(&self) -> f32

Returns the value of avg_data_out, or the default value if avg_data_out is unset.

Source

pub fn avg_data_in(&self) -> f32

Returns the value of avg_data_in, or the default value if avg_data_in is unset.

Source

pub fn total_data_in(&self) -> u64

Returns the value of total_data_in, or the default value if total_data_in is unset.

Source

pub fn total_packets_in(&self) -> u64

Returns the value of total_packets_in, or the default value if total_packets_in is unset.

Source

pub fn total_data_out(&self) -> u64

Returns the value of total_data_out, or the default value if total_data_out is unset.

Source

pub fn total_packets_out(&self) -> u64

Returns the value of total_packets_out, or the default value if total_packets_out is unset.

Trait Implementations§

Source§

impl Clone for CMsgServerNetworkStats

Source§

fn clone(&self) -> CMsgServerNetworkStats

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CMsgServerNetworkStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for CMsgServerNetworkStats

Source§

fn default() -> CMsgServerNetworkStats

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CMsgServerNetworkStats

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CMsgServerNetworkStats, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for CMsgServerNetworkStats

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for CMsgServerNetworkStats

Source§

fn eq(&self, other: &CMsgServerNetworkStats) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CMsgServerNetworkStats

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CMsgServerNetworkStats

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,